ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin J. Mitchell" <kevin.mitch...@xmls.com>
Subject RE: Problem Calling SOAP Service
Date Mon, 10 Jul 2000 12:37:12 GMT
I have seen this, and fixed it. Here is a description of the fix...

In com/ibm/cs/net/HTTPUtils.java (or org/apache/util/net/HTTPUtils.java), we
are using println to create the HTTP headers for the SOAP request.  On UNIX,
this produces \n line terminators.  However, HTTP specifies \r\n. Tomcat had
a problem with this (I guess I can see why ) So, all I did was replace each
println call with print call followed by a "\r\n" and life was good. The
code to read the response was unchanged...

This is what it looks like...

    /* send it out */
    out.print(HTTP_POST + " " + url.getFile() + " HTTP/" + HTTP_VERSION +
"\r\n");
    out.print(HEADER_HOST + ": " + url.getHost () + ':' + url.getPort () +
"\r\n");
    out.print(HEADER_CONTENT_TYPE + ": " + contentType+ "\r\n");
    out.print(HEADER_CONTENT_LENGTH + ": " + content.length ()+ "\r\n");
    out.print("Accept: text/xml\r\n");

    for (Enumeration e = headers.keys (); e.hasMoreElements (); ) {
      Object key = e.nextElement ();
      out.print(key + ": " + headers.get (key)+ "\r\n");
    }

    out.print("\r\n");
    out.println(content);
    out.print("\r\n\r\n");
    out.flush ();

    //    out.close ();


I will post this to the soap-dev list as well, and see how it can get into
the Apache SOAP code base...
-----Original Message-----
From: Anthony Bova [mailto:abova@alabanza.com]
Sent: Friday, July 07, 2000 4:23 PM
To: soap-user@xml.apache.org
Subject: Problem Calling SOAP Service


Has anyone seen this problem? I am running IBM-SOAP v1.2 under Tomcat on
a linux system with the IBM JVM v1.3.  When I try to deploy the stock
quote example as follows I get a problem back.

[root@db stockquote]# java com.ibm.soap.server.ServiceManagerClient
http://localhost:8080/ibm-soap/rpcrouter.jsp deploy
DeploymentDescriptor.xml
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=error parsing HTTP status line: Connection reset by peer: Connection
reset by peer; targetException=java.lang.IllegalArgumentException: error
parsing HTTP status line: Connection reset by peer: Connection reset by
peer]
        at java.lang.Throwable.<init>(Throwable.java:96)
        at java.lang.Exception.<init>(Exception.java:44)
        at com.ibm.soap.SOAPException.<init>(SOAPException.java:14)
        at com.ibm.soap.SOAPException.<init>(SOAPException.java:20)
        at
com.ibm.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:
58)

        at com.ibm.soap.rpc.Call.invoke(Call.java:88)
        at
com.ibm.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.j
ava:51)

        at
com.ibm.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java:64
)

        at
com.ibm.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:129)

The window where Tomcat was started outputs one line with "Processing
SOAP request...  ".  The IBM Admin page shows
"urn:i3solutions-delayed-quotes" when I chose list.    If I ignore the
error and try to call the example I get the same error.


Thanks,

Tony Bova
Alabanza


Mime
View raw message