You really have two options:

1) Create a cxf.xml file that defines a jaxws:client bean with 
  a) createdFromAPI attribute set to true
  b) the "id" set to the qname of the endpoint in the wsdl 
In this case, you can configure the interceptors and such on the client using 
the properties on the jaxws:client element.

2)  Programmatically: see:
   http://cxf.apache.org/docs/jax-ws-configuration.html
The section entitled: Configuring an Endpoint/Client Proxy Using CXF APIs


Dan




On Tue September 15 2009 4:58:13 am Karl Schmeing wrote:
> Hi,
> 
> i am using WSSE with authentication and encryption.
> 
> 
> Therefore I configured my clientApplication.xml
> 
> <bean id="clientFactory"
>  class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property
>  name="serviceClass" value="demo.spring.ProductServiceImpl" />
> 
>         <property name="outInterceptors">
>             <list>
>                 <bean
>  class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" /> <ref
>  bean="wss4jOutConfiguration" />
>             </list>
>         </property>
>         <property name="inInterceptors">
>             <list>
>                 <bean
>  class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" /> <ref
>  bean="wss4jInConfiguration" />
>             </list>
>         </property>
>     </bean>
> 
> 
> When I use wsdl2java I get a client.
> 
> 
> 
> @WebServiceClient(name = "ProductServicesBLA",
>                   wsdlLocation =
>  "file:/Users/karlschmeing/Documents/workspace/cxf-webservices/src/b2b-bla-
> productservicesbla.wsdl", targetNamespace =
>  "http://www.server.de/b2b/contract/bla/productservicesbla_v01_00";)
> 
> public class ProductServicesBLA_Service extends Service {
> 
>     public final static URL WSDL_LOCATION;
>     public final static QName SERVICE = new
>  QName("http://www.server.de/locationname";, "ProductServicesBLA"); public
>  final static QName ProductServicesBLAPort = new
>  QName("http://http://www.server.de/locationname";, "ProductServicesBLA");
>  static {
>         URL url = null;
>         try {
>             url = new
>  URL("file:/Users/karlschmeing/Documents/workspace/cxf-webservices/src/b2b-
> bla-productservicestbla.wsdl"); } catch (MalformedURLException e) {
>             System.err.println("Can not initialize the default wsdl from
>  file:/Users/karlschmeing/Documents/workspace/cxf-webservices/src/b2b-bla-p
> roductservicesbla.wsdl"); // e.printStackTrace();
>         }
>         WSDL_LOCATION = url;
>     }
> 
>     public ProductServicesBLA_Service(URL wsdlLocation) {
>         super(wsdlLocation, SERVICE);
>     }
> 
> How can i integrate the WebServiceClient into the Spring configuration? Is
>  it possible to annotate the in and out interceptor?
> 
> Regards,
> 
> Ralf Josephy
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to