Note that when I view the ethereal trace, I verified that my initial
"HTTP CONNECT" packet is sending the Proxy-Authorization HTTP header, so
there's something else wrong.
> -----Original Message-----
> From: Karr, David
> Sent: Wednesday, July 12, 2006 10:18 AM
> To: users_at_saaj.dev.java.net
> Subject: RE: [SAAJ-USR] SOAPConnection through authenticated proxy
>
> I may have made a little progress on this, but I'm just
> getting a different error now. The URL I'm connecting to is
> using https, so I tried setting the "https.proxyHost" and
> "https.proxyPort" properties to the same values as I'm
> setting for the "http." versions. I also added a set of the
> "proxySet" property to "true".
>
> After making these changes, sending my test message gives me
> the following very quickly:
>
> javax.xml.soap.SOAPException: Failed to send message:
> java.io.IOException: Unable to tunnel through proxy. Proxy returns
> "HTTP/1.1 407 Proxy Authentication Required"
>
> Note that before I made this change, I was using Ethereal to
> monitor my communication, and I saw packets going between my
> local IP and the destination IP, which I should not have seen
> if I was going through the proxy (my network engineer told me this).
>
> > -----Original Message-----
> > From: Karr, David
> > Sent: Tuesday, July 11, 2006 4:55 PM
> > To: users_at_saaj.dev.java.net
> > Subject: RE: [SAAJ-USR] SOAPConnection through authenticated proxy
> >
> > Actually, after a little more research, I think I'm going down the
> > right path, but I'm having one problem.
> >
> > I'm setting the "http.proxyHost" and "http.proxyPort" system
> > properties, and I'm using the Commons Codec Base64 class to
> encode the
> > "user:password" pair, and setting the stringified byte
> value from that
> > on the "Proxy-Authorization" mime header.
> >
> > The result looks somewhat like this:
> >
> > String pair = getProxyUser() + ":" + getProxyCredentials();
> > System.out.println("pair[" + pair + "]");
> > Base64 encoder = new Base64();
> > byte[] encodedBytes = encoder.encode(pair.getBytes());
> > System.out.println("encoded[" + new String(encodedBytes) + "]");
> > mimeHeaders.addHeader("Proxy-Authorization",
> > new String(encodedBytes));
> >
> > Unfortunately, this isn't working. I get a connection timeout.
> > Before talking to someone that hosts the third-party
> service, is there
> > anything obviously wrong with this that I need to fix?
> >
> > > -----Original Message-----
> > > From: Karr, David
> > > Sent: Tuesday, July 11, 2006 3:19 PM
> > > To: users_at_saaj.dev.java.net
> > > Subject: [SAAJ-USR] SOAPConnection through authenticated proxy
> > >
> > > In the past, I've used the Jakarta Commons HttpClient package to
> > > connect to external URLs through our authenticated proxy.
> > > I now have some code that uses "SOAPConnection.call()",
> > which I have
> > > to use to make a call through our authenticated proxy.
> > > Is there a reasonable interface that would allow me to configure
> > > this? Does this require setting certain system properties?
> > I imagine
> > > this would be setting "http.proxyHost", at least, but I
> > don't see any
> > > way to set connection properties, like I'll need in order
> > to send the
> > > "Proxy-Authorization" HTTP header.
> > >
> > > I may be limited by the fact that I'm using JWSDP 1.1 (although I
> > > don't see anything new in this area in JWSDP 1.3).
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_saaj.dev.java.net
> > For additional commands, e-mail: users-help_at_saaj.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_saaj.dev.java.net
> For additional commands, e-mail: users-help_at_saaj.dev.java.net
>
>