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

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



   I am not wheater or not that is the key but at least I am missing the
   namespace declaration of namespace prefix "inp":
   <?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>
           <inp:DataSet>
               <Record>
                   <addr_1>wRtnAdd1</addr_1>
                   <addr_2>wRtnAdd2</addr_2>
                   <addr_3>wRtnAdd3</addr_3>
                   <addr_4>wRtnAdd4</addr_4>
                   <city>wRtnCity</city>
                   <state>state</state>
                   <postal_code>postalcd</postal_code>
                   <country_name>country</country_name>
               </Record>
           </inp:DataSet>
       </soap:Body>
   </soap:Envelope>
   You declared the following namespace prefixes:
      xsd
      xsi
      soap
   But you forgot to declare "inp" which is used at element "DataSet".
   Thomas.
   ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 11.02.2011 06:12:36:
   > Von: mr.singhjitender@xxxxxxxxx
   > An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Datum: 11.02.2011 06:31
   > Betreff: XML parse failed at line 1, col 0: no element found
   > Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   >
   > 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="[4]http://www.w3.org/2001/XMLSchema";'
   >       +' xmlns:xsi="[5]http://www.w3.org/2001/XMLSchema-instance";'
   >       +' xmlns:soap="[6]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:
   > [7]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   -

   --
   IMPORTANT NOTICE:
   This email is confidential, may be legally privileged, and is for the
   intended recipient only. Access, disclosure, copying, distribution, or
   reliance on any of it by anyone else is prohibited and may be a
   criminal
   offence. Please delete if obtained in error and email confirmation to
   the sender.

References

   1. http://www.w3.org/2001/XMLSchema
   2. http://www.w3.org/2001/XMLSchema-instance
   3. http://schemas.xmlsoap.org/soap/envelope/
   4. http://www.w3.org/2001/XMLSchema
   5. http://www.w3.org/2001/XMLSchema-instance
   6. http://schemas.xmlsoap.org/soap/envelope/
   7. 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
-----------------------------------------------------------------------