This is my httpapi_debug





Pheraps the problemi s this :





??chunk size = 373

get_chunk_size returned 373

calling comm_blockread

<S:Fault
xmlns:ns4="http://www.w3.org/2003/05/soap-envelope";><faultcode>S:Client</fau
ltcode><faultstring>Couldn't create SOAP message due to exception: XML
reader error: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character 'x' (code 120) excepted space, or '&gt;' or "/&gt;"

at [row,col {unknown-source}]:
[1,76]</faultstring></S:Fault></S:Body></S:Envelope>

comm_blockread returned 373 ?.. ?







HTTPAPI Ver 1.25beta2 released 2012-03-06

OS/400 Ver V7R2M0



http_persist_open(): entered

http_long_ParseURL(): entered

DNS resolver retrans: 2

DNS resolver retry : 2

DNS resolver options: x'00000136'

DNS default domain: mydom.com.IT

DNS server found: 192.168.99.15

DNS server found: 192.168.99.16

http_persist_post(): entered

http_persist_req(POST) entered.

http_long_ParseURL(): entered

do_oper(POST): entered

There are 0 cookies in the cache

POST /mobws HTTP/1.1

Host: api.mobyt.it:80

User-Agent: http-api/1.24

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

Content-Length: 533





senddoc(): entered

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:mob="http://a
pi.mobyt.it/mobws"><soapenv:Header/><soapenv:Body><mob:sendSMS><!--Optional:
--><username>a.mymail@xxxxxxxxx</username><!--Optional:--><password>mypws</p
assword><!--Optional:--><message_type>N</message_type><!--Optional:--><sende
r>test</sender><!--Optional:--><recipient>33789999999</recipient><!--Optiona
l:--><message>hi
ni</message><!--Optional:--><order_id>?</order_id></mob:sendSMS></soapenv:Bo
dy></soapenv:Envelope>

recvresp(): entered

HTTP/1.1 500 Server Error

Date: Mon, 22 Jan 2018 12:39:27 GMT

Server: Jetty(9.2.7.v20150116)

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

Transfer-Encoding: chunked





SetError() £13: HTTP/1.1 500 Server Error

recvresp(): end with 500

recvdoc parms: chunked 0

header_load_cookies() entered

recvchunk(): entered

get_chunk_size(): entered

6e



chunk size = 110

get_chunk_size returned 110

calling comm_blockread

<?xml version='1.0' encoding='UTF-8'?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";><S:Body>

comm_blockread returned 110





get_chunk_size(): entered

175



chunk size = 373

get_chunk_size returned 373

calling comm_blockread

<S:Fault
xmlns:ns4="http://www.w3.org/2003/05/soap-envelope";><faultcode>S:Client</fau
ltcode><faultstring>Couldn't create SOAP message due to exception: XML
reader error: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character 'x' (code 120) excepted space, or '&gt;' or "/&gt;"

at [row,col {unknown-source}]:
[1,76]</faultstring></S:Fault></S:Body></S:Envelope>

comm_blockread returned 373





get_chunk_size(): entered

0



chunk size = 0

get_chunk_size returned 0

SetError() £13: HTTP/1.1 500 Server Error

http_close(): entered





Hi all

I?m try to call this web service sendSMS at http://api.mobyt.it:80/mobws ;

I have written this RPGLE



SOAP =

// '<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>'

'<?xml version="1.0"?>'

+'<soapenv:Envelope xmlns:soapenv='

+'"http://schemas.xmlsoap.org/soap/envelope/";'

+ 'xmlns:mob="http://api.mobyt.it/mobws";>'

+ '<soapenv:Header/>'

+ '<soapenv:Body>'

+ '<mob:sendSMS>'

+ '<!--Optional:-->'

+ '<username>myuser</username>'

+ '<!--Optional:-->'

+ '<password>mypsw</password>'

+ '<!--Optional:-->'

+ '<message_type>N</message_type>'

+ '<!--Optional:-->'

+ '<sender>test</sender>'

+ '<!--Optional:-->'

+ '<recipient>phonenbr</recipient>'

+ '<!--Optional:-->'

+ '<message>hi</message>'

+ '<!--Optional:-->'

+ '<order_id>?</order_id>'

+ '</mob:sendSMS>'



http_debug(*ON);



rc = http_url_post_xml('http://api.mobyt.it:80/mobws'

: %addr(SOAP) + 2

: %len(SOAP)

: *NULL

: *NULL

: *NULL

: HTTP_TIMEOUT

: HTTP_USERAGENT

: 'text/xml'

: ' ');



But I receive HTTP/1.1 500 Server Error



This is the httpapi_debug



http_long_ParseURL(): entered

do_oper(POST): entered

There are 0 cookies in the cache

POST /mobws HTTP/1.1

Host: api.mobyt.it:80

User-Agent: http-api/1.24

Content-Type: text/xml

SOAPAction:

Content-Length: 554

senddoc(): entered

<?xml version="1.0"?><soapenv:Envelope x

recvresp(): entered

HTTP/1.1 500 Server Error

Date: Mon, 22 Jan 2018 12:19:21 GMT



This is the SoapuUi content (that works fine)



POST http://api.mobyt.it:80/mobws HTTP/1.1

Accept-Encoding: gzip,deflate

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

SOAPAction: ""

Content-Length: 715

Host: api.mobyt.it:80

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:mob="http://api.mobyt.it/mobws";>

<soapenv:Header/>

<soapenv:Body>

<mob:sendSMS>

<!--Optional:-->

<username>myUser</username>

<!--Optional:-->

<password>mypsw</password>

<!--Optional:-->

<message_type>N</message_type>

<!--Optional:-->

<sender>test</sender>

<!--Optional:-->

<recipient> phonenbr </recipient>

<!--Optional:-->

<message>hi</message>

<!--Optional:-->

<order_id>?</order_id>

</mob:sendSMS>

</soapenv:Body>

</soapenv:Envelope>



Can some help me to understand where am I wrong ?

Thanks in advance


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.