You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2001/03/09 13:29:23 UTC
Re: Fatal deployment bug in SOAP 2.1 with JDK 1.3, Tomcat 4.x and Xerces
1.3.0?
gregg.leichtman@i2image.com wrote:
>
> I have gone and debugged SOAP 2.1 by placing print statements in the SOAP
> source and rebuilding the jar with ant. I have also run the tcp tunnel GUI.
> In both cases I have found that the response is being truncated within the
Hi,
A bug has been fixed in TOMCAT4.0. Now it should work.
Cheers
Jean-frederic
> SOAP body. I am running JDK 1.3, Tomcat 4.x and Xerces 1.3.0.
>
> Here is where I print out the stream in org.apache.soap.util.IOUtils:
>
> public static String getStringFromReader (Reader reader) throws IOException {
> BufferedReader bufIn = new BufferedReader(reader);
> StringWriter swOut = new StringWriter();
> PrintWriter pwOut = new PrintWriter(swOut);
> String tempLine;
> while ((tempLine = bufIn.readLine()) != null) {
> pwOut.println(tempLine);
> System.out.println("GSL reading line: " + tempLine);
> }
>
> This is what I get from this print out:
>
> GSL reading line: Content-Type: text/xml; charset=utf-8
> GSL reading line: Content-Transfer-Encoding: 8bit
> GSL reading line: Content-ID: <7112969.983980283753.apache-soap.gleichtm.dell-44-gregl>
> GSL reading line: Content-Length: 438
> GSL reading line:
> GSL reading line: <?xml version='1.0' encoding='UTF-8'?>
> GSL reading line: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmln
> s:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> GSL reading line: <SOAP-ENV:Body>
> GSL reading line: <ns1:deployResponse xmlns:ns1="urn:x
>
> You will notice that this truncated output matches (for the most part) that of the tcp tunnel below.
>
> Response in tcp tunnel GUI:
>
> HTTP/1.0 200 OK
> Content-Type: text/xml; charset=utf-8
> Content-Length: 438
> Date: Wed, 07 Mar 2001 15:51:22 GMT
> Server: Apache Tomcat/4.0-b1 (HTTP/1.1 Connector)
> Set-Cookie: JSESSIONID=074001C73536B284A5407801E05247E1;Path=/soap
>
> Content-Type: text/xml; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Content-ID: <7112969.983980283753.apache-soap.gleichtm.dell-44-gregl>
> Content-Length: 438
>
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd
> ="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:deployResponse xmlns:ns1="urn:x
>
> This is the end of the response.
>
> This looks like a bug to me. Either the stream is not being flushed propely
> or the stream is not being filled properly. Any of the developers want to
> respond to this? Any help would be appreciated.
>
> -=> Gregg <=-
>
> gregg.leichtman@i2image.com on 03/07/2001 08:23:29 AM
>
> Please respond to soap-dev@xml.apache.org
>
> To: soap-dev@xml.apache.org
> cc:
>
> Subject: Has ANYONE gotten SOAP 2.1 addressbook and Tomcat 4.x to work?
>
> I have SOAP 2.0 working correctly for the addressbook sample and my own
> SOAP client and servlet, but have been working for several days and am
> unable to get SOAP 2.1 to work. No matter what I try, I cannot deploy the
> addressbook service and always get:
>
> E:
> \LocalCVSRepository\SourceCode\PyramidApp\tomcat-4.0\webapps\soap\WEB-INF\classes\samples\addressb
>
> ook>java org.apache.soap.server.ServiceManagerClient
> http://localhost:8080/soap/servlet/rpcrouter de
> ploy DeploymentDescriptor.xml
> org.xml.sax.SAXParseException: The markup in the document preceding the
> root element must be well-fo
> rmed.
> at
> org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1060)
> at
> org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.jav
>
> a:626)
> at
> org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.dispatch(XMLDocumentScan
>
> ner.java:805)
> at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
>
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
> at
> org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison.java:85)
>
> at org.apache.soap.rpc.Call.invoke(Call.java:213)
> at
> org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:127)
>
> at
> org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java:140)
>
> at
> org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:228)
>
> Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
> msg=Parsing error, response wa
> s:
> Content-Type: text/xml; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Content-ID: <5760903.983970286708.apache-soap.gleichtm.dell-44-gregl>
> Content-Length: 438
>
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.
> w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema
> ">
> <SOAP-ENV:Body>
> <ns1:deployResponse xmlns:ns1="urn:x
> ]
> at org.apache.soap.rpc.Call.invoke(Call.java:223)
> at
> org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:127)
>
> at
> org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java:140)
>
> at
> org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:228)
>
> Classpath is:
>
> E:
> \LocalCVSRepository\SourceCode\PyramidApp\tomcat-4.0\webapps\soap\WEB-INF\classes\samples\addressb
>
> ook>set CLASSPATH
> CLASSPATH=E:\LocalCVSRepository\SourceCode\jars\xerces.jar;E:
> \LocalCVSRepository\SourceCode\jars\soa
> p.jar;E:\LocalCVSRepository\SourceCode\jars\activation.jar;E:
> \java\sun\javamail-1.2\lib\mailapi.jar;
> .;E:\java\apache\ant\lib\ant.jar;E:
> \LocalCVSRepository\SourceCode\PyramidApp\tomcat-4.0\lib\jasper.j
> ar;E:
> \LocalCVSRepository\SourceCode\PyramidApp\tomcat-4.0\server\catalina.jar;e:
> \java\sun\Swing-1.1.
> 1\mac.jar;e:\java\sun\jdk1.3\jre\lib\rt.jar;e:
> \java\sun\jdk1.3\jre\lib\i18n.jar;e:\java\sun\jdk1.3\l
> ib\tools.jar;e:\java\sun\jdk1.3\lib\dt.jar;E:
> \java\JPython\JPython-1.1\jpython.jar;;E:\java\sun\3D\j
> dk1.2.2\jre\lib\ext\j3daudio.jar;E:
> \java\sun\3D\jdk1.2.2\jre\lib\ext\j3dcore.jar;E:\java\sun\3D\jdk1
> .2.2\jre\lib\ext\j3dutils.jar;E:
> \java\sun\3D\jdk1.2.2\jre\lib\ext\vecmath.jar;e:\java\sun\JAI\jai1_0
> _2\jre\lib\ext\jai_core.jar;e:
> \java\sun\JAI\jai1_0_2\jre\lib\ext\jai_codec.jar;e:\java\sun\JAI\jai1_
> 0_2\jre\lib\ext\mlibwrapper_jai.jar;E:
> \LocalCVSRepository\SourceCode\PyramidApp\tomcat-4.0\webapps\s
> oap\WEB-INF\classes
>
> Files are:
>
> E:\LocalCVSRepository\SourceCode\jars>ls -l
> total 8570
> drwxr-xr-x 2 1134 None 0 Feb 26 11:32 CVS
> -rw-r--r-- 1 1134 None 33329 Mar 2 08:12 Jama-1.0.1.jar
> -rw-r--r-- 1 1134 None 6949301 Feb 22 12:57 Pyramid2.jar
> drwxr-xr-x 5 1134 None 0 Feb 22 12:57 XML
> -rw-r--r-- 1 1134 None 45386 May 21 1999 activation.jar
> -rw-r--r-- 1 1134 None 115454 Nov 16 12:32 ant.jar
> -rw-r--r-- 1 1134 None 174761 Jan 29 14:13 avalonapi.jar
> -rw-r--r-- 1 1134 None 24774 Feb 9 09:36 bootstrap.jar
> -rw-r--r-- 1 1134 None 5195128 Apr 27 2000 j2ee.jar
> -rw-r--r-- 1 1134 None 183421 Jan 18 09:30 jai_codec.jar
> -rw-r--r-- 1 1134 None 1018280 Jan 18 09:30 jai_core.jar
> -rw-r--r-- 1 1134 None 29871 Nov 27 11:57
> jakarta-regexp-1.2.jar
> -rw-r--r-- 1 1134 None 7637 Aug 1 2000 jcert.jar
> -rw-r--r-- 1 1134 None 223212 Apr 11 2000 jmxri.jar
> -rw-r--r-- 1 1134 None 3098 Aug 1 2000 jnet.jar
> -rw-r--r-- 1 1134 None 463471 Aug 1 2000 jsse.jar
> -rw-r--r-- 1 1134 None 161771 Feb 14 15:03 junit.jar
> -rw-r--r-- 1 1134 None 112735 May 30 2000 mac.jar
> -rw-r--r-- 1 1134 None 153117 Dec 1 00:08 mailapi.jar
> -rw-r--r-- 1 1134 None 34859 Jan 18 09:30 mlibwrapper_jai.jar
> -rw-r--r-- 1 1134 None 23512 Feb 9 09:36 naming.jar
> -rw-r--r-- 1 1134 None 54446 Nov 8 13:38 servlet.jar
> -rw-r--r-- 1 1134 None 200855 Feb 5 18:09 soap.jar
> -rw-r--r-- 1 1134 None 267837 Sep 12 16:17 tyrex-0.9.6.jar
> -rw-r--r-- 1 1134 None 275946 May 4 2000 vecmath.jar
> -rw-r--r-- 1 1134 None 1605266 Feb 15 10:01 xerces.jar
> -rw-r--r-- 1 1134 None 167681 Jan 31 17:21 xercesSamples.jar
>
> E:
> \LocalCVSRepository\SourceCode\PyramidApp\tomcat-4.0\webapps\soap\WEB-INF\lib>ls
>
> -l
> total 99
> drwxr-xr-x 2 1134 None 0 Feb 21 14:57 CVS
> -rw-r--r-- 1 1134 None 200855 Feb 5 18:09 soap.jar
>
> I have recompiled the samples to no avail.
>
> I have confirmed that the service manager IS reading the deployment
> descriptor file, since removing various XML elements registers a logical
> complaint. For instance, removing the provider element indicates that one
> provider element is missing.
>
> I'm using Xerces 1.3.0 and Sun JDK1.3.
>
> There is nothing in my jre/lib/ext directory.
>
> Any help would be appreciated.
>
> -=>
> Gregg <=-