[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: http_url_post Question
Thanks Scott,
Now I'm getting "Server was unable to process request." -->
'', hexadecimal value 0x01, is an invalid character. Line 1 ,
position 1.</faultstring> , I attached the program (JETACITPU2.TXT) ,
httpapi_debug.txt. can you take a look to othem please.
thank you very much.
On Tue, Apr 1, 2008 at 11:19 PM, Scott Klement
<[1]sk@xxxxxxxxxxxxxxxx> wrote:
EXAMPLE20 shows how to send a longer SOAPAction. Take a look at
the
code for EXAMPLE20.
Jeffreehy Talavera wrote:
> I got an error message, because the SOAPAction is getting
truncated.
> as you can see, the SOAPAction is greater than 64 characters
and
> it gets truncated when I execute the program, as you can see in
the
> httpapi_debug.txt file attached
-------------------------------------------------------------------
----
This is the FTPAPI mailing list. To unsubscribe, please go to:
[2]http://www.scottklement.com/mailman/listinfo/ftpapi
-------------------------------------------------------------------
----
--
Jeffreehy Talavera Díaz
Consultor Especialista
S390, iSeries & Open Systems
References
1. mailto:sk@xxxxxxxxxxxxxxxx
2. http://www.scottklement.com/mailman/listinfo/ftpapi
H DFTACTGRP(*NO) BNDDIR('LIBHTTP/HTTPAPI')
/copy libhttp/qrpglesrc,httpapi_h
D Incoming PR
D description 50A
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 32767A varying const
D attrs * dim(32767)
D const options(*varsize)
D Add_SOAPACTION PR
D Header 1024A varying
D UserData * value
D SOAP s 32767A varying
D rc s 10I 0
D*rate s 8F
D description s 50A
D entero s 3A
D Result s 50A
D msg s 50A
D wait s 1A
D datos s 10A
D size s 10I 0
D country2 s 10A
D text s 255a
/free
SOAP =
'<?xml version="1.0" encoding="utf-8"?>'
+'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
+' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
+' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
+' <soap:Body>'
+' <Punteros_XML xmlns="http://www.gobernacion.gob.hn/'
+'WS_Punteros_Citas/Punteros" />'
+' </soap:Body>'
+'</soap:Envelope>';
http_debug(*ON);
http_xproc( HTTP_POINT_ADDL_HEADER
: %paddr(Add_SOAPACTION) );
rc = http_url_post(
'http://172.30.7.2/WS_Punteros_Citas/Punteros.asmx'
: %addr(SOAP)
: %len(SOAP)
: '/tmp/PunterosCitas.soap'
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml' );
if (rc <> 1);
msg = http_error();
else;
msg = Result;
endif;
dsply msg ' ' wait;
*inlr = *on;
/end-free
P Incoming B
D Incoming PI
D description 50A
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 32767A varying const
D attrs * dim(32767)
D const options(*varsize)
/free
if (name = 'Punteros_XMLResult');
Result = value;
endif;
/end-free
P E
P Add_SOAPACTION B
D Add_SOAPACTION PI
D Header 1024A varying
D UserData * value
/free
Header = 'SOAPAction: '
+ 'http://www.gobernacion.gob.hn/WS_Punteros_Citas'
+ '/Punteros/Punteros_XML'
+ x'0d25';
/end-free
P E
HTTPAPI Ver 1.22 released 2008-03-25
OS/400 Ver V5R3M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_url_post(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: bancolafise.hn
DNS server found: 192.168.0.5
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /WS_Punteros_Citas/Punteros.asmx HTTP/1.1
Host: 172.30.7.2
User-Agent: http-api/1.22
Content-Type: text/xml
Expect: 100-continue
Content-Length: 335
SOAPAction: http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punteros/Punteros_XML
recvresp(): entered
HTTP/1.1 100 Continue
Via: 1.1 MIGRA-ISA
SetError() Ñ13: HTTP/1.1 100 Continue
senddoc(): entered
|<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <Punteros_XML xmlns="http://www.gobernacion.gob.hn/WS_Punteros_Citas/Punteros" /> </soap:Body></soap:Envelop
recvresp(): entered
HTTP/1.1 500 Internal Server Error.
Connection: Keep-Alive
Content-Length: 512
Date: Wed, 02 Apr 2008 21:48:50 GMT
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
SetError() Ñ13: HTTP/1.1 500 Internal Server Error.
recvdoc parms: identity 512
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.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server was unable to process request. --> '', hexadecimal value 0x01, is an invalid character. Line 1, position 1.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
SetError() Ñ13: HTTP/1.1 500 Internal Server Error.
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------