[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Truncated SOAPAction parm in http_url_post_xml() function, like example18, httpapi.
The API provides the http_xproc procedure which allows you to establish
exit point if the SoapAction is required to be longer than 64. Exit
points require a procedure pointer which are used to make a callback
into a procedure you must define locally. In this case the local
procedure simply assigns an returns a value longer than 64.
http_xproc( HTTP_POINT_ADDL_HEADER : %paddr(Add_SOAPACTION) )
Scott has provided EXAMPLE20 to demonstrate.
Cheers, Peter
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of John Rusling
Sent: Sunday, 12 April 2009 5:38
To: HTTPAPI and FTPAPI Projects
Subject: Truncated SOAPAction parm in http_url_post_xml() function,like
example18, httpapi.
I made a copy of example18 to try it on the ZipCodeToLatitudeLogitude
web service at
http://www.jasongaylord.com/webservices/zipcodes.asmx. (found thru
xmethods.net)
I first I tested it at www.soapclient.com/soapmsg.html successfully and
used those results
to construct the input soap message.
I've pasted the contents of the httpapi_debug.txt (way below).
When I run this from RPG I get blank results and it looks like what
happens is
the soap action is getting truncated.
This -
SOAPAction:
http://www.jasongaylord.com/webservices/zipcodes/ZipCodeToLatitu
should be this -
SOAPAction:
http://www.jasongaylord.com/webservices/zipcodes/ZipCodeToLatitudeLogitu
de
In the http_url_post_xml() function the soap action parameter is 64a so
this is
evidently why it's truncated.
My question is..
Is there a work-around for this that i'm unaware of?
Do I not need to pass the soap action parm to get this to work?
Is it not possible to use this when the soap action is > 64 characters?
Any info is appreciated.
John B.
Relevant code -
SOAP =
'<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
+'<SOAP-ENV:Envelope'
+' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"'
+' xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"'
+' xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"'
+' xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"'
+' xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"'
+'
xmlns:tns="http://www.jasongaylord.com/webservices/zipcodes"'
+' xmlns:s="http://www.w3.org/2001/XMLSchema"'
+' xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"'
+' xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"'
+' xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"'
+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
+' xmlns:xsd="http://www.w3.org/2001/XMLSchema" >'
+'<SOAP-ENV:Body>'
+'<tns:ZipCodeToLatitudeLogitude'
+'
xmlns:tns="http://www.jasongaylord.com/webservices/zipcodes">'
+' <tns:ZipCode>' + %trim(ZipCode) + '</tns:ZipCode>'
+'</tns:ZipCodeToLatitudeLogitude>'
+'</SOAP-ENV:Body>'
+'</SOAP-ENV:Envelope>';
http_debug(*ON);
rc = http_url_post_xml(
'http://www.jasongaylord.com/webservices/zipcodes.asmx'
: %addr(SOAP) + 2
: %len(SOAP)
: *null
: %paddr(Incoming)
: %addr(rate)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml'
: 'http://www.jasongaylord.com/webservices/'
+ 'zipcodes/ZipCodeToLatitudeLogitude');
httpapi_debug.txt -
....+....1....+....2....+....3....+....4....+...
************Beginning of data**************
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V5R4M0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: JOHNSONBROTHERS.COM
DNS server found: 192.168.20.214
DNS server found: 192.168.20.5
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /webservices/zipcodes.asmx HTTP/1.1
Host: www.jasongaylord.com
User-Agent: http-api/1.23
Content-Type: text/xml
Content-Type: text/xml
SOAPAction:
http://www.jasongaylord.com/webservices/zipcodes/ZipCodeToLatitu
Expect: 100-continue
Content-Length: 913
recvresp(): entered
SetError() #43: CommTCP_read: No 100-Continue (error ignored)
senddoc(): entered
<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
recvresp(): entered
HTTP/1.1 200 OK
Cache-Control: no-cache
Date: Sat, 11 Apr 2009 19:10:02 GMT
Pragma: no-cache
Content-Length: 1314
Content-Type: text/xml; charset=utf-8
Expires: -1
Server: Microsoft-IIS/6.0
Server: Microsoft-IIS/6.0
SetError() #13: HTTP/1.1 200 OK
recvdoc parms: identity 1314
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3
http_close(): entered
************End of Data********************
#####################################################################################
This correspondence is for the named person's use only. It may contain confidential or legally privileged information, or both. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Veda Advantage. If you need assistance, please contact Veda Advantage on either :- Australia 133124 or New Zealand +64 9 367 6200
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------