// lAuSoapConnector = Automation 'Microsoft Soap Type Library v3.0'.HttpConnector30 // lAuSoapSerializer = Automation 'Microsoft Soap Type Library v3.0'.SoapSerializer30 // lAuXMLDoc = Automation 'Microsoft XML, v6.0'.DOMDocument60 SoapConnectorWithParameter() IF ISCLEAR(lAuSoapConnector) THEN CREATE(lAuSoapConnector); lAuSoapConnector.Property('EndPointURL','https://ssl.ibanrechner.de:443/soap/index.php'); //lAuSoapConnector.Property('EndPointURL','https://ssl.ibanrechner.de:443/soap_noarrays/index.php'); //Connector.Property('EndPointURL','http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl') //lAuSoapConnector.Property('EndPointURL','https://ssl.ibanrechner.de/soap/index.php'); //lAuSoapConnector.Property('EndPointURL','https://ssl.ibanrechner.de/calculate_iban'); lAuSoapConnector.Connect; lAuSoapConnector.Property('AuthUser','********'); lAuSoapConnector.Property('AuthPassword','********'); lAuSoapConnector.Property('Timeout',5*100); //lAuSoapConnector.Property('SoapAction','https://ssl.ibanrechner.de/calculate_iban'); //lAuSoapConnector.Property('SoapAction','https://ssl.ibanrechner.de:443/soap_noarrays/index.php#calculate_iban'); //Connector.Property('SoapAction','urn:ec.europa.eu:taxud:vies:services:checkVat:types'); lAuSoapConnector.BeginMessage; IF ISCLEAR(lAuSoapSerializer) THEN CREATE(lAuSoapSerializer); lAuSoapSerializer.Init(lAuSoapConnector.InputStream); //Serializer.StartEnvelope('','STANDARD','utf-16'); lAuSoapSerializer.StartEnvelope('','RPC','utf-16'); //lAuSoapSerializer.StartEnvelope('SOAP','RPC'); //lAuSoapSerializer.StartHeader; //lAuSoapSerializer.EndHeader; lAuSoapSerializer.StartBody('STANDARD'); lAuSoapSerializer.StartElement('calculate_iban'); lAuSoapSerializer.StartElement('country'); lAuSoapSerializer.WriteString('AT'); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('bankcode'); lAuSoapSerializer.WriteString('12345'); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('account'); lAuSoapSerializer.WriteString('0123456'); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('country'); lAuSoapSerializer.WriteString('AT'); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('user'); lAuSoapSerializer.WriteString('*******'); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('password'); lAuSoapSerializer.WriteString('******'); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('bic'); lAuSoapSerializer.WriteString(''); lAuSoapSerializer.EndElement; lAuSoapSerializer.StartElement('legacy_mode'); lAuSoapSerializer.WriteString('0'); lAuSoapSerializer.EndElement; lAuSoapSerializer.EndElement; lAuSoapSerializer.EndBody; lAuSoapSerializer.EndEnvelope; lAuSoapConnector.EndMessage; CREATE(lAuXMLDoc); lAuXMLDoc.load(lAuSoapConnector.OutputStream); lAuXMLNode := lAuXMLDoc.selectSingleNode('//valid'); IF NOT ISCLEAR(lAuXMLNode) THEN MESSAGE(lAuXMLNode.text); lAuXMLDoc.save('c:\output.xml'); CLEAR(lAuXMLDoc); CLEAR(lAuSoapConnector); //lFiResponse.CREATE('c:\output.txt'); //lFiResponse.OPEN('c:\output.txt'); //lFiResponse.WRITE(lAuSoapConnector.OutputStream);
Comments