PDA

View Full Version : Secify Http proxy and http port



Manish Rathi
Sep 26th, 2006, 02:48 AM
Hi am trying to access google web service.

I use HTTP Proxy setting to access internet in IE

How do i specify these sessting in spring bean declaration

<bean id="googleService" class="fullgoogleapi.GooglePortProxyFactoryBean">
<property name="serviceFactoryClass">
<value>org.apache.axis.client.ServiceFactory</value>
</property>
<property name="wsdlDocumentUrl">
<value>http://api.google.com/GoogleSearch.wsdl</value>
</property>
<property name="namespaceUri">
<value>urn:GoogleSearch</value>
</property>
<property name="serviceName">
<value>GoogleSearchService</value>
</property>
<property name="portName">
<value>GoogleSearchPort</value>
</property>
<property name="portInterface">
<value>com.google.GoogleSearchPort</value>
</property>
<property name="serviceInterface">
<value>fullgoogleapi.GoogleSearchService</value>
</property>
</bean>

I am getting error

aused by: javax.xml.rpc.ServiceException: Error processing WSDL document:
java.net.ConnectException: Connection timed out: connect
at org.apache.axis.client.Service.initService(Service .java:250)
at org.apache.axis.client.Service.<init>(Service.java:165)
at org.apache.axis.client.ServiceFactory.createServic e(ServiceFactory.java:198)
at org.springframework.remoting.jaxrpc.LocalJaxRpcSer viceFactory.createService(LocalJaxRpcServiceFactor y.java:273)
at org.springframework.remoting.jaxrpc.LocalJaxRpcSer viceFactory.createJaxRpcService(LocalJaxRpcService Factory.java:209)
at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.prepare(JaxRpcPortClientInterceptor. java:355)
at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.afterPropertiesSet(JaxRpcPortClientI nterceptor.java:329)
at org.springframework.remoting.jaxrpc.JaxRpcPortProx yFactoryBean.afterPropertiesSet(JaxRpcPortProxyFac toryBean.java:63)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:957)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:924)
... 11 more

Can anyone help me to reolve this issue

Manish Rathi
Sep 30th, 2006, 12:23 AM
We just to pass the proxy parameters to JVM so that while opening URL connection JVM will use these system parameters.

System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "HostName");
System.getProperties().put("proxyPort", "PortNumber");

cybersimba
Apr 8th, 2009, 11:00 AM
http://onebyteatatime.wordpress.com/2009/04/08/spring-web-service-call-using-proxy-per-connection/