XML error on line 6: junk after document element
| From: | Antonio Ognio | Date: | Wed, 15 Jan 2003 20:56:31 +0000 |
| Subject: | XML error on line 6: junk after document element | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-391@lists.php.net to get a copy of this message | ||
Hello,
I've been testing the CVS version of PEAR SOAP
at home in a virtual machine running RH 8
without any problem.. but now at office I'm
getting this message when I try SOAP/example/client.php
against any PEAR SOAP-based server:
XML error on line 6: junk after document element
I don't have this error when running stockquotes.php
for example.
At home it was a fresh install of Redhat 8 (spanish
locale with UTF-8 character set) running Apache 2
and PHP from Redhat's RPMS.
Here at the office I have a real RH8.0 system (no virtual
machine) running Apache 2 and PHP also from the RPMS and
can't get rid of this message.
I thought it was an issue with my character set. I was
using es_ES.ISO-8859-1 as my locale and moved tu UTF-8
but that was not the problem.
Researching a bit in google, it seems to be a problem
in expat.. but as I told you, the same components at
another installation didn't showed any problems.. so
I'm still clueless...
I'm experiencing this problem with SOAP-0.7.1.tgz and
the CVS version as of today.
Please give me some advice..
Thanks
Antonio
P.S: My wire is this:
OUTGOING:
POST /SOAP/example/server.php HTTP/1.0
User-Agent: PEAR-SOAP 0.7.1
Host: localhost
Content-Type: text/xml; charset=UTF-8
Content-Length: 734
SOAPAction: ""
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="urn:SOAP_Example_Server"
xmlns:ns5="http://soapinterop.org/xsd"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:echoStruct>
<inputStruct xsi:type="ns5:SOAPStruct">
<varString xsi:type="xsd:string">test string</varString>
<varInt xsi:type="xsd:int">123</varInt>
<varFloat
xsi:type="xsd:float">123.123</varFloat></inputStruct></ns4:echoStruct>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
INCOMING
HTTP/1.1 500 Internal Server Error
Date: Wed, 15 Jan 2003 20:52:17 GMT
Server: PEAR-SOAP 0.7.1
Accept-Ranges: bytes
X-Powered-By: PHP/4.2.2
Content-Length: 3008
Connection: close
Content-Type: text/xml; charset=UTF-8
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:QName">SOAP-ENV:Parser</faultcode>
<faultstring xsi:type="xsd:string">XML error on line 7: junk after
document element</faultstring>
<faultactor xsi:type="xsd:anyURI">
</faultactor>
<detail xsi:type="xsd:string">&lt;?xml
version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot;?&gt;&lt;SOAP-ENV:Envelope
xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
xmlns:ns4=&quot;urn:SOAP_Example_Server&quot;
xmlns:ns5=&quot;http://soapinterop.org/xsd&quot;
SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;ns4:echoStruct&gt;&lt;inputStruct
xsi:type=&quot;ns5:SOAPStruct&quot;&gt;&lt;varString
xsi:type=&quot;xsd:string&quot;&gt;test
string&lt;/varString&gt;&lt;varInt
xsi:type=&quot;xsd:int&quot;&gt;123&lt;/varInt&gt;&lt;varFloat
xsi:type=&quot;xsd:float&quot;&gt;123.123&lt;/varFloat&gt;&lt;/inputStruct&gt;&lt;/ns4:echoStruct&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;&lt;?xml
version=&quot;1.0&quot;
encoding=&quot;UTF-8&quot;?&gt;&lt;SOAP-ENV:Envelope
xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:SOAP-ENC=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;
xmlns:ns4=&quot;urn:SOAP_Example_Server&quot;
xmlns:ns5=&quot;http://soapinterop.org/xsd&quot;
SOAP-ENV:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;&lt;SOAP-ENV:Body&gt;&lt;ns4:echoStruct&gt;&lt;inputStruct
xsi:type=&quot;ns5:SOAPStruct&quot;&gt;&lt;varString
xsi:type=&quot;xsd:string&quot;&gt;test
string&lt;/varString&gt;&lt;varInt
xsi:type=&quot;xsd:int&quot;&gt;123&lt;/varInt&gt;&lt;varFloat
xsi:type=&quot;xsd:float&quot;&gt;123.123&lt;/varFloat&gt;&lt;/inputStruct&gt;&lt;/ns4:echoStruct&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>