You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by "McCullough, Ryan" <rm...@rightnow.com> on 2009/02/04 21:12:25 UTC

RE: Axis C++ 1.6 client app connecting using https through http proxy

Can you open a jira on this issue? I have reproduced the problem.

m_ServerInterface = new Soap(m_ServerUrl);

m_ServerInterface->setProxy("172.22.4.145", 8080);
m_ServerInterface->setProxyUsername("CORP\\zqa09");
m_ServerInterface->setProxyPassword("rnt4me");

Exec_rv* Response = m_ServerInterface->exec(Request); // <-- throws exception


Here is the exception I received:
AxisTransportException: Cannot open a channel to the remote end.
OpenSSL error is -1. Error stack:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

-Ryan

-----Original Message-----
From: Klitos Kyriacou [mailto:klitos.kyriacou@gmail.com] 
Sent: Friday, January 23, 2009 5:02 PM
To: Apache AXIS C User List
Subject: Re: Axis C++ 1.6 client app connecting using https through http proxy

Hi Ryan,

Yes, communication to and from the proxy server is unencrypted HTTP
requests and responses. As for whether "the communication from the
proxy server to your web service is encrypted", I am not sure as I am
not an expert on HTTP. As I understand it (and my understanding here
is very vague), the client sends an HTTP CONNECT request to the proxy
server and that establishes a way of talking to the final destination
(web service) using HTTP tunneling. I think this means the client
continues to send plain-text HTTP requests to the proxy server but the
payload data is encrypted. I can send traces, if you need them, on
Monday when I get back to work.

Thanks,
Klitos


On 23/01/2009, McCullough, Ryan <rm...@rightnow.com> wrote:
> 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:amra@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 <kl...@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
>
>

RE: Axis C++ 1.6 client app connecting using https through http proxy

Posted by Nadir Amra <am...@us.ibm.com>.
Ryan,

Just send the stuff to me.....I think you can also attach files to the 
jira.. If not, I can attach the files when you send them. thanks.

Nadir Amra


"McCullough, Ryan" <rm...@rightnow.com> wrote on 02/05/2009 07:39:02 
PM:

> [image removed] 
> 
> RE: Axis C++ 1.6 client app connecting using https through http proxy
> 
> McCullough, Ryan 
> 
> to:
> 
> Apache AXIS C User List
> 
> 02/05/2009 07:39 PM
> 
> Cc:
> 
> "klitos.kyriacou@gmail.com", Nadir Amra
> 
> I think I have a working solution.
> 
> Klitos, would you be willing to test my changes? Do you need Axis 
> binaries or source code?
> 
> Nadir, if Klitos reports that my changes work, how can I go about 
> getting these changes included in the project?
> 
> -Ryan
> 
> -----Original Message-----
> From: Klitos Kyriacou [mailto:klitos.kyriacou@gmail.com] 
> Sent: Thursday, February 05, 2009 3:36 AM
> To: Apache AXIS C User List
> Subject: Re: Axis C++ 1.6 client app connecting using https through http 
proxy
> 
> Thanks! That issue seems to have been open for two years. Hopefully,
> your useful test report will help to move things on.
> 
> Klitos


RE: Axis C++ 1.6 client app connecting using https through http proxy

Posted by "McCullough, Ryan" <rm...@rightnow.com>.
I think I have a working solution.

Klitos, would you be willing to test my changes? Do you need Axis binaries or source code?

Nadir, if Klitos reports that my changes work, how can I go about getting these changes included in the project?

-Ryan

-----Original Message-----
From: Klitos Kyriacou [mailto:klitos.kyriacou@gmail.com] 
Sent: Thursday, February 05, 2009 3:36 AM
To: Apache AXIS C User List
Subject: Re: Axis C++ 1.6 client app connecting using https through http proxy

Thanks! That issue seems to have been open for two years. Hopefully,
your useful test report will help to move things on.

Klitos

Re: Axis C++ 1.6 client app connecting using https through http proxy

Posted by Klitos Kyriacou <kl...@gmail.com>.
Thanks! That issue seems to have been open for two years. Hopefully,
your useful test report will help to move things on.

Klitos

RE: Axis C++ 1.6 client app connecting using https through http proxy

Posted by "McCullough, Ryan" <rm...@rightnow.com>.
Nevermind, it is already written up as https://issues.apache.org/jira/browse/AXISCPP-899

-Ryan

-----Original Message-----
From: Klitos Kyriacou [mailto:klitos.kyriacou@gmail.com] 
Sent: Wednesday, February 04, 2009 4:02 PM
To: Apache AXIS C User List
Subject: Re: Axis C++ 1.6 client app connecting using https through http proxy

On 04/02/2009, McCullough, Ryan <rm...@rightnow.com> wrote:
> Can you open a jira on this issue? I have reproduced the problem.

Thanks Ryan, that's great, but I'm not sure how to use Jira. I'm a
beginner with Apache products. Is it easy to use if I haven't used it
before?

Klitos

Re: Axis C++ 1.6 client app connecting using https through http proxy

Posted by Klitos Kyriacou <kl...@gmail.com>.
On 04/02/2009, McCullough, Ryan <rm...@rightnow.com> wrote:
> Can you open a jira on this issue? I have reproduced the problem.

Thanks Ryan, that's great, but I'm not sure how to use Jira. I'm a
beginner with Apache products. Is it easy to use if I haven't used it
before?

Klitos