Hi,
Try add proxy server address and port for the http conduit to see if
it helps, some code like
Client client = ClientProxy.getClient(proxy);
HTTPConduit conduit = (HTTPConduit) client.getConduit();
HTTPClientPolicy httpClientPolicy = conduit.getClient();
httpClientPolicy.setProxyServer(your proxy server);
httpClientPolicy.setProxyServerPort(your proxy port);
conduit.setClient(httpClientPolicy);
Freeman
On 2011-9-27, at 下午5:10, afilippov wrote:
Hi,
Just ran into the problem of calling external WS from SMX. The
situation is
following: my laptop is in the local net that uses proxy. I got my SMX
running locally and I start my local Tomcat with WS deployed (WSDL is
accessible). To construct WS stub I did the following:
RegisterServiceService client = new RegisterServiceService();
RegisterService proxy = client.getRegisterServicePort();
Map<String, Object> ctxt = ((BindingProvider)proxy
).getRequestContext();
ctxt.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8081/sis-reg-service/soap/registerservice");
That works fine. But at first service call I am getting:
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP
response '502:
Proxy Error ( Forefront TMG denied the specified Uniform Resource
Locator
(URL). )' when communicating with
http://localhost:8081/sis-reg-service/soap/registerservice
After my changing location to non-proxy net the problem disappeared.
I wonder where I could find proxy settings for ServiceMix?
Thanks.
--
View this message in context:
http://servicemix.396122.n5.nabble.com/SMX-4-and-calls-to-external-WS-tp4844610p4844610.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com