[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XML parse failed at line 1, col 0: no element found
Hi Scott,
I am very happy to see you helping the guys working for Iseries. First
time I am going to implement web service from RPG.
When I tested with WSDL in soapUI utility it works fine.
But when I tried to post soap message from rpgle program to sap xi
data services then get an error that error code -1 and message XML
parse failed at line 1, col 0: no element found.
The following XML and code I am using
inputXMLstring = '<inp:DataSet><Record><addr_1>'
+ %trim(wRtnAdd1) + '</addr_1><addr_2>'
+ %trim(wRtnAdd2) + '</addr_2><addr_3>'
+ %trim(wRtnAdd3) + '</addr_3><addr_4>'
+ %trim(wRtnAdd4) + '</addr_4><city>'
+ %trim(wRtnCity) + '</city><state>'
+ %trim(state) + '</state><postal_code>'
+ %trim(postalcd) + '</postal_code><country_name>'
+ %trim(country) + '</country_name>'
+'</Record></inp:DataSet>';
SOAP ='<?xml version="1.0" encoding="utf-8"?>'
+ '<soap:Envelope'
+ '
xmlns:xsd="[1]http://www.w3.org/2001/XMLSchema"'
+'
xmlns:xsi="[2]http://www.w3.org/2001/XMLSchema-instance"'
+'
xmlns:soap="[3]http://schemas.xmlsoap.org/soap/envelope/">'
+'<soap:Header/>'
+'<soap:Body>'
+ %trim(inputXMLstring)
+'</soap:Body>'
+'</soap:Envelope>';
http_xproc( HTTP_POINT_ADDL_HEADER
: %paddr(Add_SOAPACTION) );
rc = http_url_post_xml(%trim(httplink)
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(Incoming)
: %addr(xmldata)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml; charset=utf-8');
Please help me out where I am wrong and what I need to do.
Please also let me know how I can debug all the procedure/function
related to HTTPAPI (http_url_post_xml).
Thanks & Regards
Jitender Singh.
References
1. http://www.w3.org/2001/XMLSchema
2. http://www.w3.org/2001/XMLSchema-instance
3. http://schemas.xmlsoap.org/soap/envelope/
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------