in reply to SOAP::LITE with WSDL /SOAP::WSDL won't work

syntax error at line 1, column 0, byte 0 at /usr/lib/perl5/XML/Parser. +pm line 187

This likely means that there is a syntax error in whatever XML is parsed at that location. The other errors you seem to get also seem to point towards invalid XML. So, are you sure that what you get as a server response is actual, valid XML?

Replies are listed 'Best First'.
Re^2: SOAP::LITE with WSDL /SOAP::WSDL won't work
by Kell (Initiate) on Sep 29, 2010 at 12:10 UTC
    This is all what trace shows me:
    Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 578 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://localhost/MYSOAP#mySub" <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:wsdlsoap="h +ttp://schemas.xmlsoap.org/wsdl/soap/" soap:encodingStyle="http://sche +mas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.or +g/soap/envelope/" xmlns:tns1="http://localhost/MYSOAP" xmlns:wsdl="ht +tp://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap +.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst +ance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><tns1:m +ySub><foo xsi:type="xsd:string">HELLO</foo></tns1:mySub></soap:Body>< +/soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Connection: close Date: Wed, 29 Sep 2010 11:43:07 GMT Accept-Ranges: bytes Content-Length: 226 Content-Type: text/plain; charset=utf-8 Last-Modified: Wed, 29 Sep 2010 09:17:08 GMT Client-Date: Wed, 29 Sep 2010 11:43:07 GMT Client-Peer: IP:80 Client-Response-Num: 1 use lib qw(/path/to/my/module); use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -dispatch_to('MYSOAP') # ->dispatch_with({ 'urn:localhost:wsdl:MYSOAP' => 'MYSOAP' }) -> handle; syntax error at line 1, column 0, byte 0 at /usr/lib/perl5/XML/Parser. +pm line 190 use lib qw(/path/to/my/module); use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -dispatch_to('MYSOAP') # ->dispatch_with({ 'urn:localhost:wsdl:MYSOAP' => 'MYSOAP' }) -> handle;

    As you see there is my server code shown up, which is stored in $arg and i thought that here should be the xml part which is at the beginning of the output

    the WSDL file was created by Pod::WSDL so i think that should be valid but i'm going to check this out.
    I checked the xml Output which trace shows me and it is valid xml


    Thanks so far.

      I can't make much of your description, and don't really understand what is in your output and what is source code from a program and what produces what. Have you inspected the results you get using wget or curl, to inspect the actual data returned, instead of looking at things through SOAP?

      If the server returns invalid data, the problem is not in your client but in the server. Maybe you just have invalid POD when you created your WSDL file?

        The problem is solved.


        thx Corion, i should better analyse what i got and what i should get.
        The problem was that i got the wrong response from server. I thought that the xml data i saw on my trace output was the response but it was the request.
        All i had to do was to edit my .htacces. After this i got the correct response.