Problem with SOAP Webservice

RomRom Member Posts: 64
Hi everyone,


i try to connect a WSDL File at a Website. This is the WSDL file https://ssl.ibanrechner.de/soap/?wsdl and at this link there are the descriptions of the functions.
https://ssl.ibanrechner.de/soap/

I tried to use this sample http://www.mibuso.com/dlinfo.asp?FileID=539.

The Connection should work, because at the website, i can see the request. (there is a counter) I also tested the soap-connection with an php script, which also works very well.

The response of the request should be stored in xml file. Is it possible, that the xml works with arrays? (The response uses arrays)
At the moment i have no idea, what i did wrong.

Could somebody help me?

here is my code:
// 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);

Thanks in advance!

Martin

Comments

Sign In or Register to comment.