I am trying to use ERP¹s to maintain some state from client to server. When
I use the client code generated from cxf wsdl2java I notice there is a
method for creating a port that accepts a javax EndpointReference. However,
when I use the JaxWS client factory I cannot seem to find anyway to set the
EPR of the type javax EndpointReference. I can only find a method that
accepts a cxf EPR data type which his not compatible with the standard jaxws
standard EndpointReference data type.
For example, I create (or retrieve from a service) an javax EPR:
W3CEndpointReference epr = <new EPR from somewhere>; //standard EPR
data type now used with JAXB
Then I use the cxf generated client and the ServiceDelegateAccesspr to use
that EPR to create a client/port:
ServiceImpl test = ServiceDelegateAccessor.get(new
TestServiceService()); TestService testService =
test.getPort(epr,TestService.class);
However, now I want to use JaxWS factories to create this client using the
following code:
ClientProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.getClientFactoryBean().setEndpointReference(epr); //this line does
not compile because the EPR is not compatible with the signature
TestService ts = (TestService) factory.create();
Any insight on this would be helpful.
Thanks
Shannon