You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by David Wall <dw...@Yozons.com> on 2001/10/26 22:59:56 UTC

HTTPS with proxy server bug

I've been having a lot of trouble doing HTTPS with a proxy server using
Apache SOAP 2.2.

I read an article about Apache SOAP 2.0 and its problems and it pointed to a
URL http://www.innovation.ch/java/HTTPClient/ .  However, since 2.0, Apache
SOAP has added support for SSL and proxy servers.  However, I believe there
may still be a bug that I'm trying to research.  I can only get Apache SOAP
2.2 to work with a proxy server via HTTP.  When I try over HTTPS, it does
not work (my soap client code works fine over HTTPS when there's no proxy
server, only when I set the proxy server does it fail -- and it works with a
proxy if via http).

Because I'm using JSSE, I'm looking at the patch at the URL above that was
associated with JSSE to see how to make Apache SOAP clients work using HTTPS
with a proxy server.  Does anybody understand how proxying over HTTPS "ought
to work"?  That is, is the client supposed to open a connection the proxy
server over HTTP first, give it some info, and then send the SSL-encrypted
data?  Is Apache SOAP supposed to handle this already?

Best regards,
David

Re: HTTPS with proxy server bug

Posted by David Wall <dw...@Yozons.com>.
> Because I'm using JSSE, I'm looking at the patch at the URL above that was
> associated with JSSE to see how to make Apache SOAP clients work using
HTTPS
> with a proxy server.  Does anybody understand how proxying over HTTPS
"ought
> to work"?  That is, is the client supposed to open a connection the proxy
> server over HTTP first, give it some info, and then send the SSL-encrypted
> data?  Is Apache SOAP supposed to handle this already?

https and proxies works as follows: the client creates a connection to
the proxy (as usual), and then sends a CONNECT request, giving the host
and port of the server the client is trying to talk to. If ok, the proxy
creates a connection to the desired server and then sends back a 200
response to the client, and from then on acts like a tunnel, i.e. just
blindly shuffles packgets between the two. At that point the client
basically has a connection with the server, so it starts the usual SSL
handshake and sets up the secure connection.

As far as seeing that in the code: you'll see the method
enableSSLTunneling in HTTPClient which sets up the tunnel through the proxy.
After that
an SSL-socket is wrapped around the underlying socket.

Does anybody know if SOAP 2.2 was designed to work this way?

Thanks,
David


Soap 2.2 and Tomcat 4 problems..

Posted by Tim Read <tr...@lsi.uned.es>.
Hi,

After spending several days trying to install Soap with Tomcat and getting
no where, I hoped that someone here might be able to help me.

I am using jdk 1.3.1, Soap 2.2, Tomcat 4, latest versión of Xerecs.jar,
bsf.jar, activation.jar, mail.jar, and am working on Windows2000 platform,
and my CLASSPATH variable has the following value:

echo %CLASSPATH%
c:\tomcat\lib\xerces.jar;c:\tomcat\lib\soap.jar;c:\tomcat\lib\activation.jar
;c:\tomcat\lib\mail.jar;

I put soap.war in the Tomcat webapps dir, and after starting Tomcat can
access the router
and use the admin tool to see that there are no services deployed. I am also
using the TcpTunnelGui
to monitor soap messages. When I try to deploy the deployment descriptor for
anything (either
one of the samples or something I have written) I wrote I get the following
error:

java org.apache.soap.server.ServiceManagerClient
http://localhost:8070/soap/servlet/rpcrouter deploy javaxml2\CD
Catalog.xml
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=Parsing error, response was:
The markup in the document preceding the root element must be well-formed.;
targetException=org.xml.sax.SAXParseException: The markup in the document
preceding
the root element must be well-formed.]
        at org.apache.soap.rpc.Call.invoke(Call.java:250)
        at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClien
t.java:129)
        at
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java
:142)
        at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
30)

And the last part of the message that the TcpTunnelGui shows is:

<?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:xml-soap-service-mana

Which looks to me like Tomcat is not returing all the response...

The interesting thing is that if I use the admin tool and check for deployed
services,
it shows the application as correctly deployed.

However, from the command line, if I try to list the deployed services:

java org.apache.soap.server.ServiceManagerClient
http://localhost:8070/soap/servlet/rpcrouter list
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=Parsing error, response was:
The markup in the document preceding the root element must be well-formed.;
targ
etException=org.xml.sax.SAXParseException: The markup in the document
preceding
the root element must be well-formed.]
        at org.apache.soap.rpc.Call.invoke(Call.java:250)
        at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClien
t.java:129)
        at
org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient.java:1
51)
        at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
37)

And in TcpTunnelGui, I get the following message:

<?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:listResponse xmlns:ns1="urn:xml-soap-service-management-service"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Array" ns2:arr

Which, while different from the previous message, once again seems to be cut
short....

Needless to say that attempting to call the service, it does not work
(although Tomcat finds the class ok):

java javaxml2.CDAdder http://localhost:8070/soap/servlet/rpcrouter "Riding
the Midnight Train" "Doc Watson"
Adding CD titled 'Riding the Midnight Train' by 'Doc Watson'
[SOAPException: faultCode=SOAP-ENV:Client; msg=Parsing error, response was:
The markup in the document preceding the root element must be well-formed.;
targ
etException=org.xml.sax.SAXParseException: The markup in the document
preceding
the root element must be well-formed.]
        at org.apache.soap.rpc.Call.invoke(Call.java:250)
        at javaxml2.CDAdder.add(CDAdder.java:34)
        at javaxml2.CDAdder.main(CDAdder.java:61)

And in TcpTunnelGui, I get the same type of cut short message:

<?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:addCDResponse xmlns:ns1=

Any suggestions would be greatly appreciated.

Tim



Soap 2.2 and Tomcat 4 problems..

Posted by Tim Read <tr...@lsi.uned.es>.
Hi,

After spending several days trying to install Soap with Tomcat and getting
no where, I hoped that someone here might be able to help me.

I am using jdk 1.3.1, Soap 2.2, Tomcat 4, latest versión of Xerecs.jar,
bsf.jar, activation.jar, mail.jar, and am working on Windows2000 platform,
and my CLASSPATH variable has the following value:

echo %CLASSPATH%
c:\tomcat\lib\xerces.jar;c:\tomcat\lib\soap.jar;c:\tomcat\lib\activation.jar
;c:\tomcat\lib\mail.jar;

I put soap.war in the Tomcat webapps dir, and after starting Tomcat can
access the router
and use the admin tool to see that there are no services deployed. I am also
using the TcpTunnelGui
to monitor soap messages. When I try to deploy the deployment descriptor for
anything (either
one of the samples or something I have written) I wrote I get the following
error:

java org.apache.soap.server.ServiceManagerClient
http://localhost:8070/soap/servlet/rpcrouter deploy javaxml2\CD
Catalog.xml
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=Parsing error, response was:
The markup in the document preceding the root element must be well-formed.;
targetException=org.xml.sax.SAXParseException: The markup in the document
preceding
the root element must be well-formed.]
        at org.apache.soap.rpc.Call.invoke(Call.java:250)
        at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClien
t.java:129)
        at
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java
:142)
        at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
30)

And the last part of the message that the TcpTunnelGui shows is:

<?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:xml-soap-service-mana

Which looks to me like Tomcat is not returing all the response...

The interesting thing is that if I use the admin tool and check for deployed
services,
it shows the application as correctly deployed.

However, from the command line, if I try to list the deployed services:

java org.apache.soap.server.ServiceManagerClient
http://localhost:8070/soap/servlet/rpcrouter list
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=Parsing error, response was:
The markup in the document preceding the root element must be well-formed.;
targ
etException=org.xml.sax.SAXParseException: The markup in the document
preceding
the root element must be well-formed.]
        at org.apache.soap.rpc.Call.invoke(Call.java:250)
        at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClien
t.java:129)
        at
org.apache.soap.server.ServiceManagerClient.list(ServiceManagerClient.java:1
51)
        at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
37)

And in TcpTunnelGui, I get the following message:

<?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:listResponse xmlns:ns1="urn:xml-soap-service-management-service"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Array" ns2:arr

Which, while different from the previous message, once again seems to be cut
short....

Needless to say that attempting to call the service, it does not work
(although Tomcat finds the class ok):

java javaxml2.CDAdder http://localhost:8070/soap/servlet/rpcrouter "Riding
the Midnight Train" "Doc Watson"
Adding CD titled 'Riding the Midnight Train' by 'Doc Watson'
[SOAPException: faultCode=SOAP-ENV:Client; msg=Parsing error, response was:
The markup in the document preceding the root element must be well-formed.;
targ
etException=org.xml.sax.SAXParseException: The markup in the document
preceding
the root element must be well-formed.]
        at org.apache.soap.rpc.Call.invoke(Call.java:250)
        at javaxml2.CDAdder.add(CDAdder.java:34)
        at javaxml2.CDAdder.main(CDAdder.java:61)

And in TcpTunnelGui, I get the same type of cut short message:

<?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:addCDResponse xmlns:ns1=

Any suggestions would be greatly appreciated.

Tim



Re: HTTPS with proxy server bug

Posted by David Wall <dw...@Yozons.com>.
> Because I'm using JSSE, I'm looking at the patch at the URL above that was
> associated with JSSE to see how to make Apache SOAP clients work using
HTTPS
> with a proxy server.  Does anybody understand how proxying over HTTPS
"ought
> to work"?  That is, is the client supposed to open a connection the proxy
> server over HTTP first, give it some info, and then send the SSL-encrypted
> data?  Is Apache SOAP supposed to handle this already?

https and proxies works as follows: the client creates a connection to
the proxy (as usual), and then sends a CONNECT request, giving the host
and port of the server the client is trying to talk to. If ok, the proxy
creates a connection to the desired server and then sends back a 200
response to the client, and from then on acts like a tunnel, i.e. just
blindly shuffles packgets between the two. At that point the client
basically has a connection with the server, so it starts the usual SSL
handshake and sets up the secure connection.

As far as seeing that in the code: you'll see the method
enableSSLTunneling in HTTPClient which sets up the tunnel through the proxy.
After that
an SSL-socket is wrapped around the underlying socket.

Does anybody know if SOAP 2.2 was designed to work this way?

Thanks,
David