[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: XML parse failed at line 1, col 0: no element found
Hi,
I'm a complete xml and soap dummie, so I may be totally off, but I can't see that you have defined the namespace alias of inp that you are using in your inputXMLstring. The only ones that I see defined are xsd, xsi and soap.
Regards,
Kaj
-----Oprindelig meddelelse-----
Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] På vegne af jitender singh
Sendt: 11. februar 2011 06:13
Til: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Emne: 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="http://www.w3.org/2001/XMLSchema"'
+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
+' xmlns:soap="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.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------