Problem while trying to consume proxy service behind proxy server

drorav's picture
Hi, I'm using WSO2 ESB V2.0.2. I've managed to expose simple proxy service from WSDL URI. (http://www.webservicex.net/CovertPressure.asmx?WSDL) My WSO2 esb is working behind proxy server, and in order to be able to import the WSDL from the net the following proxy server definition has been added to the wso2server.bat file at the startup command: -Dhttp.proxyHost= -Dhttp.proxyPort=9999 But I still can't consume the service. At the log I see the invocation and an error about connection issue. Do I need to add the proxy definitions in some other place as well, so I will be able to call my service behind proxy server? Thanks in advance, Dror
indika's picture

Hi Please attached the full

Hi

Please attached the full log file.

And check the ?wsdl of created proxy service and compare it with actual wsdl

Thanks
Indika

drorav's picture

Thanks for your fast

Thanks for your fast response.

At the attached file you will find the log and the relevant WSDLs.

In additional I've tried to consume the service under demilitarized zone (DMZ) and it works fine.

Thanks in advance,
Dror

indika's picture

Hi There should be an INFO log message saying

Hi

 
There should be an INFO log message saying as bellow if proxy host and port have been correctly picked up by HttpCoreNIOSender.
HTTP Sender using Proxy: {proxyHost value}:  {value of proxyPort }    
 
I cannot see such a message in you logs. It seems proxyHos and proxyPort haven’t been picked up by HttpCoreNIOSender.
 
Please edit flowing section in the axis2.xml and give correct http.proxyHost and http.proxyHost.
 
<transportSender name="http"  class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="warnOnHTTP500" locked="false">*</parameter>
        <!--parameter name="http.proxyHost" locked="false">localhost</parameter>
        <parameter name="http.proxyPort" locked="false">3128</parameter>
        <parameter name="http.nonProxyHosts" locked="false">localhost|moon|sun</parameter-->
    </transportSender>
 
Thanks
Idika
 
 
 

drorav's picture

Still Can't see the message

I add the proxy parameters to the axis2.xml according to the above but I still can't see the info message

"HTTP Sender using Proxy: {proxyHost value}: {value of proxyPort }"

In additional I can't see the message at the code of HttpCoreNIOSender.java (it seems that the code is ignoring the proxy parameters)

Do we have different version of WSO2 ESB?

I'm using the last version v2.0.2

indika's picture

Seems that HttpCoreNIOSender

Seems that HttpCoreNIOSender in esb 2.0.2 doesn't support this. But it is in upcoming 2.1 release. Could you check with RCs of 2.1 ?.

drorav's picture

what about v2.1-beta?

Ok.... Now I know why I didn't get the above message.

1. Can you tell me when you are going to release v2.1?
2. I've tried to work with the v2.1.0-beta and I faced some errors while trying to create proxy service.

The errors are related WSDL structure or somethig to that .... (the parser doesn't like the <?xml version="1.0" encoding="utf-8"?> prefix at the WSDL).

a. What is the status of the beta version?
b. Can you try to create proxy service from the web?

Thanks in advance,

Dror

indika's picture

Hi Dror The 2.1 release has

Hi Dror

The 2.1 release has been scheduled on the end of this month.

I haven't tried to creates proxy service with release Beta. But , QA team should have tested these. May be they have missed this scenario - WSDL with XML declaration. I will check that.

Dror , it is better for any issues that have occurred for you , could be reported on [1].

BTW , did you test the HTTPProxy Server Issue ?

[1] https://wso2.org/jira/browse/CARBON-4188

Thanks
Indika

annie.hkcs.gmail.com's picture

RCS is useful for text that

RCS is useful for text that is revised frequently, for example programs, documentation, procedural graphics, papers, and form letters. RCS is also capable of handling binary files, though with reduced efficiency. Revisions are stored with the aid of the diff utility.

debt reduction services

Hot Topic
Hot
Topic

Google Gadgets are a nice way to develop user interfaces for distributed services. The fact that they can be hosted anywhere over a network, not necessarily in the very portal server they eventually run in makes them re-usable and allows users to quickly...

Latest Webinar
In this webinar we'll share the range of concerns we've heard from the industry, and survey some of the new and sometimes subtle types of lock-in associated with cloud technologies.
Wednesday, 8 September, 10.00 AM (PDT)