Configure the JAXWS Server/Client Using Spring - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

CXF provides <jaxws:server>, <jaxws:client> to configure the server/client side endpoint. Here are some exmples:

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:jaxws="http://cxf.apache.org/jaxws"
   xmlns:soap="http://cxf.apache.org/bindings/soap"
   xsi:schemaLocation="
      http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
      http://cxf.apache.org/bindings/soap 
      http://cxf.apache.org/schemas/configuration/soap.xsd
      http://cxf.apache.org/jaxws
      http://cxf.apache.org/schemas/jaxws.xsd">

   <jaxws:server id="inlineImplementor" 
      address="http://localhost:8080/simpleWithAddress">
      <jaxws:serviceBean>
         <bean class="org.apache.hello_world_soap_http.GreeterImpl"/>
      </jaxws:serviceBean>
   </jaxws:server>

   <jaxws:server id="bookServer"
      serviceClass="org.myorg.mytype.AnonymousComplexTypeImpl"
      address="http://localhost:8080/act"
      bus="cxf">
      <jaxws:invoker>
         <bean class="org.myorg.service.invoker.BeanInvoker">
            <constructor-arg>
               <bean class="org.myorg.mytype.AnonymousComplexTypeImpl"/>
            </constructor-arg>
         </bean>
      </jaxws:invoker>
      <jaxws:dataBinding>
         <bean class="org.apache.cxf.jaxb.JAXBDataBinding">
            <property name="namespaceMap">
               <map>
                  <entry>
                     <key>
                        <value>
                           http://cxf.apache.org/anon_complex_type/
                        </value>
                     </key>
                     <value>BeepBeep</value>
                  </entry>
               </map>
            </property>
         </bean>
      </jaxws:dataBinding>
   </jaxws:server>

   <jaxws:client id="bookClient"
      serviceClass="org.myorg.mytype.AnonymousComplexType"
      address="http://localhost:8080/act"/>

</beans>

Since JAX-WS frontend server and client spring configuration parser are inherited from the simple frontend, please see Simple Frontend Configuration for the attribute and element definitions.