[ 
https://issues.apache.org/jira/browse/CXF-414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jarek Gawor resolved CXF-414.
-----------------------------

    Resolution: Fixed

Resolving this issue as I believe this has been fixed now.

> Setting ENDPOINT_ADDRESS_PROPERTY property on client proxy has no effect
> ------------------------------------------------------------------------
>
>                 Key: CXF-414
>                 URL: https://issues.apache.org/jira/browse/CXF-414
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>            Reporter: Jarek Gawor
>         Assigned To: Daniel Kulp
>
> I'm doing the following:
> Greeter g = foo.getPort(Greeter.class);
> (javax.xml.ws.BindingProvider)g).getRequestContext().put(javax.xml.ws.BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
>  "http://localhost:8080/jaxws-war-2.0-SNAPSHOT/hello";);
> g.greetMe("foo");
> when the ENDPOINT_ADDRESS_PROPERTY is set or not I get the following 
> exception:
> org.apache.cxf.interceptor.Fault
>         at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:299)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:138)
>         at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>         at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:12
> 4)
>         at $Proxy54.greetMe(Unknown Source)
>         at 
> org.apache.hello_world_soap_http.GreeterImpl.greetMe(GreeterImpl.java
> ....
> Caused by: java.net.MalformedURLException
>         at java.net.URL.<init>(URL.java:601)
>         at java.net.URL.<init>(URL.java:464)
>         at java.net.URL.<init>(URL.java:413)
>         at 
> org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:138
> )
>         at 
> org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:111
> )
>         at 
> org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:97)
>         at 
> org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTra
> nsportFactory.java:115)
>         at 
> org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTra
> nsportFactory.java:111)
>         at 
> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTrans
> portFactory.java:152)
>         at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:295)
>         ... 41 more
> The MalformedURLException s raised in HTTPConduit because 
> endpointInfo.getAddress() returns null or empty.
> To fix this I had to add the following to JaxWsClientProxy:
>         ...
>         ContextPropertiesMapping.mapRequestfromJaxws2Cxf(reqContext);
>         String address = 
> (String)reqContext.get(org.apache.cxf.message.Message.ENDPOINT_ADDRESS);
>         if (address != null) {
>             endpoint.getEndpointInfo().setAddress(address);
>         }
>  
>         ..
>         context.put(Client.REQUEST_CONTEXT, reqContext);
> Also, I think the problem is when the Service instance is created from full 
> WSDL the EndpointInfo is not completely filled out with the service address 
> information as specified in WSDL. But that's a separate issue from above.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to