[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML parse failed at line 1, col 0: no element found



Hello Jitender,

Could you please send a HTTPAPI debug log?  You'll find instructions for 
generating one at the bottom of the following web page:

http://www.scottklement.com/httpapi/beta/

The error tells me that you are not receiving valid XML.  But it does 
not tell me why that's the case, or what you _are_ receiving.  I'm 
hoping the debug file will supply that information.


On 2/10/2011 11:12 PM, jitender singh wrote:
>
>
>     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
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------