Nadir,

I think in HTTPTransport::setProxy( const char *pcProxyHost, unsigned int 
uiProxyPort)

You need to force the unsecure channel to be used.

Klitos, is it true that all communication to the Proxy server is unencrypted, 
but the communication from the proxy server to your web service is encrypted?

-Ryan

-----Original Message-----
From: Nadir Amra [mailto:a...@us.ibm.com] 
Sent: Friday, January 23, 2009 3:49 PM
To: Apache AXIS C User List
Subject: Re: Axis C++ 1.6 client app connecting using https through http proxy

Klitos, 

I am willing to work on this if you help me understand what needs to be 
done.   There is an issue about tunneling here: 

http://issues.apache.org/jira/browse/AXISCPP-899

Maybe if you send me the traces and/or point me to something that tells me 
how this is suppose to work I can take a look into it. 



Nadir Amra


Klitos Kyriacou <klitos.kyria...@gmail.com> wrote on 01/23/2009 09:26:09 
AM:

> [image removed] 
> 
> Axis C++ 1.6 client app connecting using https through http proxy
> 
> Klitos Kyriacou 
> 
> to:
> 
> axis-c-user
> 
> 01/23/2009 09:26 AM
> 
> Please respond to "Apache AXIS C User List"
> 
> Hi, this is my first post, I've searched the list but couldn't find
> the answer to my problem.
> 
> I have installed Axis C++ 1.6, Xerces and OpenSSL on Windows XP, and
> set up the environment variable AXISCPP_DEPLOY and edited
> axiscpp.conf.
> 
> I am trying to make an HTTPS connection to a web service through an
> HTTP proxy. I can connect successfully using Axis for Java, but I also
> want to do it in C++. In C++, I have code similar to the following:
> 
>    MyWebService api;
>    api.setProxy("199.172.46.58", 8080);
>    addCredentialsHeader(&api, username, password);  // local function
> that constructs a header
>    api.myMethod();
> 
> I do the above inside a try block. When the application calls
> myMethod(), it catches the following exception:
> 
> Axis exception 23:
>  HTTPTransportException:Unknown Transport Exception error:140770FC:
>    SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
> 
> I used Wireshark to see what's being sent through the network. First,
> I checked with the Axis Java application, which works ok. It sends a
> plain-text HTTP CONNECT request to the proxy server. The proxy server
> then responds and the encrypted text is subsequently sent to the web
> service through HTTP tunneling.
> 
> When I use Wireshark with my equivalent Axis C++ application, I can
> see that it connects to the proxy server and then sends what looks
> like random binary data instead of a CONNECT request. Could it be
> encrypting it prematurely? Obviously, the proxy server doesn't
> understand it, so it sends back an HTTP 500 Server Error.
> 
> Can anyone give me any help? Has anyone successfully managed to
> connect to an HTTPS service through an HTTP proxy?
> 
> Thanks,
> Klitos

Reply via email to