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.