You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Oliver Wulff <ow...@progress.com> on 2009/11/24 11:21:31 UTC

How to create W3CEndpointReference within my impl class

Hi there

I have to create a W3CEndpointReference within my impl class because one element within the custom soap fault is of this type.
I've found the following method within the ProviderImpl:
org.apache.cxf.jaxws.spi.ProviderImpl.createW3CEndpointReference
But how do I get access to the ProviderImpl class within my implementation?

Another approach is to use getEndpointReference of the Endpoint interface. How do I get access to the current Endpoint within my impl class?

Thanks a lot for your help

Oli

 

Re: How to create W3CEndpointReference within my impl class

Posted by Daniel Kulp <dk...@apache.org>.
On Tue November 24 2009 5:21:31 am Oliver Wulff wrote:
> Hi there
> 
> I have to create a W3CEndpointReference within my impl class because one
>  element within the custom soap fault is of this type. I've found the
>  following method within the ProviderImpl:
> org.apache.cxf.jaxws.spi.ProviderImpl.createW3CEndpointReference
> But how do I get access to the ProviderImpl class within my implementation?

Don't go there.   The ProviderImpl is kind of a JAX-WS internal thing.

> Another approach is to use getEndpointReference of the Endpoint interface.
>  How do I get access to the current Endpoint within my impl class?

With JAX-WS 2.1, you can get the endpoint reference from the 
WebServiceContext:


@Resource 
WebServiceContext ctx;


...

EndpointReference ref = ctx.getEndpointReference();


 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog