You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by angeloNZ <an...@nz.fujitsu.com> on 2009/05/26 01:03:16 UTC

Connection Refused when accessing external web service from behind an Http Proxy Server

Hi,

I'm trying to proxy a webservice that is publicly available on the internet. 
The problem I'm trying to resolve is a "ConnectException: connect refused"
errors I'm getting when invoking the service from within SM.  I'm behind a
http proxy server in the office, so from looking around the forum I saw that
I needed to add the proxy host, port, user, and password to the JAVA_OPTS
variable in servicemix.bat in order to perform http requests.  

I've already added the neccessary values but still the connection refused
message.  Using the same proxy values, my Maven is able to perform required
library downloads.  soapUI is also able to call the external webservice
directly given the proxy settings.  So what am I getting wrong here?

My logs is also showing that there were 5 delivery attempts made for the
request each giving ConnectException messages.  Any thoughts on what I need
to set elsewhere or is this a firewall issue requiring some ports being
opened?
-- 
View this message in context: http://www.nabble.com/Connection-Refused-when-accessing-external-web-service-from-behind-an-Http-Proxy-Server-tp23714462p23714462.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Connection Refused when accessing external web service from behind an Http Proxy Server

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

OK, so I accidentally hit the send button to soon, but what I was trying to say:

The HTTP endpoints have attributes you can use to configure the proxy
settings.  For your http:provider endpoint, you can find these
attributes at the bottom of
http://servicemix.apache.org/servicemix-http-new-endpoints.html.  If
you add proxyHost="10.14.1.25" proxyPort="8080" to your http provider
endpoint, that should get it to work.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/5/26 Gert Vanthienen <ge...@gmail.com>:
> L.S.,
>
> The HTTP endpoints have attributes you c
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/5/26 angeloNZ <an...@nz.fujitsu.com>:
>>
>> Hi,
>>
>> I'm trying to proxy a webservice that is publicly available on the internet.
>> The problem I'm trying to resolve is a "ConnectException: connect refused"
>> errors I'm getting when invoking the service from within SM.  I'm behind a
>> http proxy server in the office, so from looking around the forum I saw that
>> I needed to add the proxy host, port, user, and password to the JAVA_OPTS
>> variable in servicemix.bat in order to perform http requests.
>>
>> I've already added the neccessary values but still the connection refused
>> message.  Using the same proxy values, my Maven is able to perform required
>> library downloads.  soapUI is also able to call the external webservice
>> directly given the proxy settings.  So what am I getting wrong here?
>>
>> My logs is also showing that there were 5 delivery attempts made for the
>> request each giving ConnectException messages.  Any thoughts on what I need
>> to set elsewhere or is this a firewall issue requiring some ports being
>> opened?
>> --
>> View this message in context: http://www.nabble.com/Connection-Refused-when-accessing-external-web-service-from-behind-an-Http-Proxy-Server-tp23714462p23714462.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>

Re: Connection Refused when accessing external web service from behind an Http Proxy Server

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

The HTTP endpoints have attributes you c

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/5/26 angeloNZ <an...@nz.fujitsu.com>:
>
> Hi,
>
> I'm trying to proxy a webservice that is publicly available on the internet.
> The problem I'm trying to resolve is a "ConnectException: connect refused"
> errors I'm getting when invoking the service from within SM.  I'm behind a
> http proxy server in the office, so from looking around the forum I saw that
> I needed to add the proxy host, port, user, and password to the JAVA_OPTS
> variable in servicemix.bat in order to perform http requests.
>
> I've already added the neccessary values but still the connection refused
> message.  Using the same proxy values, my Maven is able to perform required
> library downloads.  soapUI is also able to call the external webservice
> directly given the proxy settings.  So what am I getting wrong here?
>
> My logs is also showing that there were 5 delivery attempts made for the
> request each giving ConnectException messages.  Any thoughts on what I need
> to set elsewhere or is this a firewall issue requiring some ports being
> opened?
> --
> View this message in context: http://www.nabble.com/Connection-Refused-when-accessing-external-web-service-from-behind-an-Http-Proxy-Server-tp23714462p23714462.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Connection Refused when accessing external web service from behind an Http Proxy Server

Posted by angeloNZ <an...@nz.fujitsu.com>.
Hi,

Here's the consumer and provider definitions in my xbean.xml:

<!-- Consumer -->
  <http:consumer service="fujitsu:AKL_RESTConsumer_Cameras"
                 endpoint="AKL_RESTConsumerEndpoint_Cameras"
                 targetService="fujitsu:HttpGetConsumer"                 
                 locationURI="http://localhost:8192/REST/AKL/cameras">  
                 
      <http:marshaler>
         <bean id="AKL_CAMERA_Marshaler" parent="getConsumerMarshaler">     		
     	    <property name="requestType" value="AKL.REST.CAMERAS" />     		     		
  	 </bean>         
      </http:marshaler>
      
  </http:consumer>
  
<!-- Provider -->                                 
  <http:provider service="fujitsu:AKL_RESTProvider_Cameras"
                 endpoint="AKL_RESTProviderEndpoint_Cameras"
                 locationURI="http://www.trafficnz.info/xml/cameras" />

The targetService of my consumer goes to a Camel RouteBuilder that does
content-based routing and forwards to the AKL_RESTProvider_Cameras service. 
The "fujitsu" namespace is http://com.fujitsu.nz so in Camel I have
something like:

from("jbi:service:http://com.fujitsu.nz/HttpGetConsumer").to("jbi:service:http://com.fujitsu.nz/AKL_RESTProvider_Cameras");


In servicemix.bat I added:

-Dhttp.proxySet=true -Dhttp.proxyHost=10.14.1.25 -Dhttp.proxyPort=8080

the host and port is the same with my web browser and maven settings and I
made sure there's a space after -Dcom.sun.management.jmxremote before I
added the proxy parameters in.

Thanks for your help.



Jean-Baptiste Onofré wrote:
> 
> Hi Angelo,
> 
> could you please provide your xbean.xml and the JVM arguments that you 
> have defined ?
> 
> Thanks
> Regards
> JB
> 
> angeloNZ wrote:
>> Hi,
>> 
>> I'm trying to proxy a webservice that is publicly available on the
>> internet. 
>> The problem I'm trying to resolve is a "ConnectException: connect
>> refused"
>> errors I'm getting when invoking the service from within SM.  I'm behind
>> a
>> http proxy server in the office, so from looking around the forum I saw
>> that
>> I needed to add the proxy host, port, user, and password to the JAVA_OPTS
>> variable in servicemix.bat in order to perform http requests.  
>> 
>> I've already added the neccessary values but still the connection refused
>> message.  Using the same proxy values, my Maven is able to perform
>> required
>> library downloads.  soapUI is also able to call the external webservice
>> directly given the proxy settings.  So what am I getting wrong here?
>> 
>> My logs is also showing that there were 5 delivery attempts made for the
>> request each giving ConnectException messages.  Any thoughts on what I
>> need
>> to set elsewhere or is this a firewall issue requiring some ports being
>> opened?
> 
> -- 
> Jean-Baptiste Onofré (Nanthrax)
> BuildProcess/AutoDeploy Project Leader
> http://buildprocess.sourceforge.net
> jb@nanthrax.net
> PGP : 17D4F086
> 
> 

-- 
View this message in context: http://www.nabble.com/Connection-Refused-when-accessing-external-web-service-from-behind-an-Http-Proxy-Server-tp23714462p23715512.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Connection Refused when accessing external web service from behind an Http Proxy Server

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Angelo,

could you please provide your xbean.xml and the JVM arguments that you 
have defined ?

Thanks
Regards
JB

angeloNZ wrote:
> Hi,
> 
> I'm trying to proxy a webservice that is publicly available on the internet. 
> The problem I'm trying to resolve is a "ConnectException: connect refused"
> errors I'm getting when invoking the service from within SM.  I'm behind a
> http proxy server in the office, so from looking around the forum I saw that
> I needed to add the proxy host, port, user, and password to the JAVA_OPTS
> variable in servicemix.bat in order to perform http requests.  
> 
> I've already added the neccessary values but still the connection refused
> message.  Using the same proxy values, my Maven is able to perform required
> library downloads.  soapUI is also able to call the external webservice
> directly given the proxy settings.  So what am I getting wrong here?
> 
> My logs is also showing that there were 5 delivery attempts made for the
> request each giving ConnectException messages.  Any thoughts on what I need
> to set elsewhere or is this a firewall issue requiring some ports being
> opened?

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086