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

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



Jitender,

Did you read through the debug file? It clearly shows that you have successfully received a XML response to your query.

Did you put anything into XMLDATA (it is not by magic that it gets information)?

Did you read through the example programs? Have you figured out what http_url_post_xml is doing? Do you understand how the response XML gets turned into useful information? Look at the twitter example for a simple example of how that happens.

Also, as almost always, show us the code!!!! We can't help you with a snippet here and a snippet there.


> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of jitender singh
> Sent: Thursday, February 24, 2011 6:03 AM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: XML parse failed at line 1, col 0: no element found
> 
> Hi Scott,
> 
> 
> First of all Thanks a lot for you support.
> 
> 
> 
> Now I am able to get the result as expected but on httpapi_debug.txt
> file on
> ifs.
> 
> Please find attached the debug file.
> 
> 
> 
> I am using the following code for address cleansing
> 
> 
> 
>      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');
> 
> 
> 
> 
> 
> The xmldata is blank I am not getting the result on xmdata variable.
> 
> 
> 
> Please suggest what I need to do now.
> 
> 
> 
> Thanks & Regards
> 
> Jitender Singh.
> 
> 
> 
> 
> On Wed, Feb 23, 2011 at 10:55 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx>
> wrote:
> 
> > Hello Jitender,
> >
> > On 2/23/2011 7:11 AM, jitender singh wrote:
> > >  When i have changed the URL got an 500   HTTP/1.1 500 Internal
> Server
> > >  Error .
> > >
> > >  Please find attached the debug file.
> > >  Please suggest how i can rid off from this error.
> >
> >
> >
> > 500 just means "an error occurred".  To find out what the error was,
> you
> > have to look at the document that the web server is sending you.
> Note
> > that the 500 error does *not* mean that you didn't get a response
> from
> > the web server -- you did!  You got a SOAP message in response.
> >
> > I'll copy/paste it from your debug file, and add some line breaks to
> > make it easier to read.  Here's the result:
> >
> > <soapenv:Envelope
> >    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> >    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > <soapenv:Body>
> >    <soapenv:Fault>
> >      <faultcode>soapenv:Sender</faultcode>
> >      <faultstring>
> >         Could not retrieve the body of the SOAP request. Error: An
> >         invalid XML character (Unicode: 0x0) was found in the element
> >         content of the document.
> >      </faultstring>
> >      <faultactor></faultactor>
> >      <detail/>
> >    </soapenv:Fault>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > So, clearly it is receiving the document you are sending, but you
> have a
> > bug somewhere in your code that's inserting an invalid character.
> >
> > I also noticed that SoapUI capitalizes the <Record> element, but you
> > have it in lowercase like <record>.  Please change that to a capital
> R
> > (XML is case sensitive.)
> >
> > Good luck
> >  --------------------------------------------------------------------
> ---
> > 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
-----------------------------------------------------------------------