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/30 23:18:59 UTC

Re: SOAP ssl & proxy

It doesn't really make sense, but I trust that it's now working for you!
<smile>  Anyway, I'm glad it works, and that's all that matters at this
point.  I'm not sure why you were having trouble since I didn't see that
problem (like the single '/' after https:).

I hope that the Apache team will include something along these lines in the
next release so that I don't have to maintain the patch for long.

David


----- Original Message -----
From: <sc...@vodafone.co.uk>
To: <dw...@yozons.com>
Sent: Tuesday, October 30, 2001 8:06 AM
Subject: FW: SOAP ssl & proxy


> David, I've figured it out. The problem was, that the whole url was being
> sent as the POST filename, because of this line in HTTPUtils:
>
> .append(httpProxyHost == null ? url.getFile() : url.toString())
>
> I'm not sure if my scenario is different to what is expected, but I have
> done this in my client:
>
> SOAPHTTPConnection connection = new SOAPHTTPConnection();
>             String proxyHost = System.getProperty("https.proxyHost");
>             String proxyPort = System.getProperty("https.proxyPort");
>             int port =-1;
>             try {port = Integer.parseInt(proxyPort);} catch (Exception e)
{}
>             if (proxyHost!=null && !proxyHost.equals("") && port>-1)
>             {
>               connection.setProxyHost(proxyHost);
>               connection.setProxyPort(port);
>
>               System.out.println("Proxy settings:
> "+connection.getProxyHost()+":"+connection.getProxyPort());
>
>             }
>             else System.out.println("Not using proxy.");
>
>
>             call.setSOAPTransport(connection);
>
> Which means that the httProxyHost is not null, so the header becomes:
>
> POST https:/host:port/soap/servlet/rpcrouter  ........
>
> (Also note the single "/"??)
>
> I have changed the line to
>
> .append(httpProxyHost != null ? url.getFile() : url.toString())
>
> and this seems to work.
>
> Does that make sense?
>
> Thanks
>
> Scott Stonham
>
> >  -----Original Message-----
> > From: Stonham, Scott, S, Technology VML
> > Sent: 30 October 2001 13:34
> > To: 'dwall@Yozons.com'
> > Subject: SOAP ssl & proxy
> >
> > David, thank you. I've been going made over this problem, and after
> > compiling your code, I can actually get the client and server to talk,
> > yahah! But this gives another problem, I get the following error:
> >
> > "(SOAP-ENV:Protocol): Premature end of stream. Data is truncated.
Read -1
> > bytes successfully, expected 235"
> >
> > Have you seen this before?
> >
> > Many thanks,
> >
> > Scott Stonham
> > Email: scott.stonham@vodafone.co.uk
> >