Hi,
i'm trying to do some soap communication to a service...but i don't get it working...
this is the code
IF ISCLEAR(comcom) THEN
CREATE(comcom) ;
IF ISCLEAR(socket) THEN
CREATE(socket);
comcom.AddBusAdapter(socket,0);
Outmsg := comcom.CreateoutMessage('sockets://10.0.0.245:80');
outstr := Outmsg.GetStream;
tmpfile.WRITEMODE := TRUE;
tmpfile.CREATE('C:\test.txt');
tmpfile.CREATEOUTSTREAM(outstr);
outstr.WRITE('POST /CCMApi/AXL/V1/soapisapi.dll');
outstr.WRITE('Host: 10.0.0.245:80');
outstr.WRITE('Accept: text/*');
outstr.WRITE('Authorization: Basic YWRtaW46YXNjMG1CZQ==');
outstr.WRITE('Content-type: text/xml');
outstr.WRITE('Content-length: 613');
outstr.WRITE('<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"');
outstr.WRITE('xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"');
outstr.WRITE('xmlns:xsd="
http://www.w3.org/2001/XMLSchema">');
outstr.WRITE('<SOAP-ENV:Body>');
outstr.WRITE('<axl:getPhone xmlns:axl="
http://www.cisco.com/AXL/1.0"');
outstr.WRITE('xsi:schemaLocation="
http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd"');
outstr.WRITE('sequence="1234">');
outstr.WRITE('<phoneName>SEP222222222245</phoneName>');
outstr.WRITE('</axl:getPhone>');
outstr.WRITE('</SOAP-ENV:Body>');
outstr.WRITE('</SOAP-ENV:Envelope>');
tmpfile.CLOSE;
Outmsg.SendWaitForReply(10000);
instr := Outmsg.GetStream;
WHILE NOT instr.EOS DO BEGIN
instr.READTEXT(Result);
MESSAGE(Result);
END;
but whatever i do , the result is empty.
I tried also with soap sdk, but even there i can't get it working...
Someone any idea or suggestion for this code
Comments
than in the application, make sure you are actually writing what you think you are to that socket.
Have you tried running a telnet client on that port and writing your file to address directly?
I have managed to get my SOAP service to respond in NAV (disabled authentication on my IIS), but you need to have the http authorization well done, if you want to use authentication.