[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] SOAP


Your "tem" namespace is wrong...  or, at least, it doesn't match what I get if I run your WSDL through SoapUI.   Your program has this:


It should be:


It seems that you added the "www" (I don't know why?) and therefore the site you're connecting to doesn't recognize the "Add", "intA" or "intB" tags because you're telling it that they're from a different specification than the one it is looking for.

This is not related to HTTPAPI -- its simply how XML works.  If you add the extra "www" in SoapUI, you'll get the exact same results.


On 2/11/2020 11:25 AM, max.ino@xxxxxxxxx wrote:
Hi, all.

I made my first program to consume a WS.

WSDL:   http://www.dneonline.com/calculator.asmx

I want to add two numbers 10 and 15

With SOAPUI I get the right result (25) while with my program I get zero

This is MY program:


URL = '';                

http_setOption('SoapAction': '"http://tempuri.org/Add"');        

SOAP =                                                           

'<soapenv:Envelope +                                             











response = http_string( 'POST': URL: SOAP: 'text/xml');          

xml-into rate %xml(response: 'case=ay ns=remove +               



*inlr = *on;                                                     

This is the debug file:

HTTPAPI Ver 1.40 released 2019-08-15

NTLM Ver 1.4.0 released 2014-12-22

OS/400 Ver V6R1M0

http_persist_open(): entered

http_long_ParseURL(): entered

DNS resolver retrans: 2

DNS resolver retry  : 2

DNS resolver options: x'00000136'

DNS default domain: cassaedilepg.it

DNS server found:

DNS server found:

Nagle's algorithm (TCP_NODELAY) disabled.

http_persist_req(POST) entered.

http_long_ParseURL(): entered

http_long_ParseURL(): entered

do_oper(POST): entered

There are 0 cookies in the cache

POST /calculator.asmx HTTP/1.1

Host: www.dneonline.com

User-Agent: http-api/1.39

Content-Type: text/xml

SOAPAction: "http://tempuri.org/Add"

Content-Length: 242

senddoc(): entered

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://www.tempuri.org/"><soapenv:Header/><soapenv:Body><tem:Add><tem:intA>10</tem:intA><tem:intB>15</tem:intB></tem:Add></soapenv:Body></soapenv:Envelope>

recvresp(): entered

HTTP/1.1 200 OK

Cache-Control: private, max-age=0

Content-Length: 325

Content-Type: text/xml; charset=utf-8

Server: Microsoft-IIS/7.5

X-AspNet-Version: 2.0.50727

X-Powered-By: ASP.NET

Date: Tue, 11 Feb 2020 16:39:05 GMT

SetError() £13: HTTP/1.1 200 OK

recvresp(): end with 200

recvdoc parms: identity 325

header_load_cookies() entered

recvdoc(): entered

SetError() £0:

recvdoc(): Receiving 325 bytes.

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AddResponse xmlns="http://tempuri.org/"><AddResult>0</AddResult></AddResponse></soap:Body></soap:Envelope>

http_close(): entered

What am I doing wrong?


Ftpapi mailing list