[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 Scott,

   The following error i have received in log file.



   HTTPAPI Ver 1.17 released 2006-09-23

   SetError() #66: XML parse failed at line 11, col 2: mismatched tag



   Thanks & Regards

   Jitender Singh.

   On Fri, Feb 11, 2011 at 12:40 PM, Scott Klement
   <[1]sk@xxxxxxxxxxxxxxxx> wrote:

     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:
     [2]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][3]http://www.w3.org/2001/XMLSchema";'
     >
     >           +'
     >     xmlns:xsi="[2][4]http://www.w3.org/2001/XMLSchema-instance";'
     >
     >           +'
     >
     xmlns:soap="[3][5]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. [6]http://www.w3.org/2001/XMLSchema
     >     2. [7]http://www.w3.org/2001/XMLSchema-instance
     >     3. [8]http://schemas.xmlsoap.org/soap/envelope/
     >
     >
     >
     >
     >
     -------------------------------------------------------------------
     ----
     > This is the FTPAPI mailing list.  To unsubscribe, please go to:
     > [9]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     -------------------------------------------------------------------
     ----
     -------------------------------------------------------------------
     ----
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [10]http://www.scottklement.com/mailman/listinfo/ftpapi
     -------------------------------------------------------------------
     ----

References

   1. mailto:sk@xxxxxxxxxxxxxxxx
   2. http://www.scottklement.com/httpapi/beta/
   3. http://www.w3.org/2001/XMLSchema
   4. http://www.w3.org/2001/XMLSchema-instance
   5. http://schemas.xmlsoap.org/soap/envelope/
   6. http://www.w3.org/2001/XMLSchema
   7. http://www.w3.org/2001/XMLSchema-instance
   8. http://schemas.xmlsoap.org/soap/envelope/
   9. http://www.scottklement.com/mailman/listinfo/ftpapi
  10. 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
-----------------------------------------------------------------------