1 The Wevservice client is injected into the spring configuration file through <jaxws:client> elements, similar to the <jaxws:endpoint> elements being serviced by the user 2 Concrete Examples <?xml version= "1.0" encoding= "UTF-8" <beans xmlns= "http://www.springframework.org/schema/" Beans " xmlns:jaxws =" Http://cxf.apache.org/jaxws " xmlns:xsi = "http://www.w3.org/2001/ Xmlschema-instance " xsi:schemalocation=" http:// Www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http:// Cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd " <jaxws:client id=" Helloclient " serviceclass= "Demo.spring.HelloWorld" address= "Http://localhost:9002/HelloWorld" &NBSP;/> </ Beans> <jaxws:client> Element Description: Id:string type, unique identity, can be invoked by the bean of spring Serviceclass:class type, full class name, SEI interface name Address:qname type, corresponding to Wsdl:service@name. Endpointname:qname, corresponding Wsdl:port@name Wsdllocation:url type, A URL to connect to to retrieve the WSDL for the service. This isn't required 3 more detailed examples <?xml version= "1.0" encoding= "UTF-8"?> <beans xmlns= "Http://www.springframework.org/schema/beans"Xmlns:jaxws= "Http://cxf.apache.org/jaxws"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation= "Http://www.springframework.org/schema/beans Http://www.springframework.org/schema/beans/spring-beans.xsd Http://cxf.apache.org/jaxws http://cxf.apache.org/ Schemas/jaxws.xsd "> <!--interceptors extend e.g Org.apache.cxf.phase.AbstractPhaseInterceptor--> <bean
Id= "Anotherinterceptor" class= "/> <!--handlers implement. e.g Javax.xml.ws.handler.soap.SOAPHandler
<bean id= "Jaxwshandler" class= "/> <!--the SOAP client bean--> <jaxws:client id=" Helloclient "
serviceclass= "Demo.spring.HelloWorld" address= "Http://localhost:9002/HelloWorld" > <jaxws:inInterceptors> <bean class= "Org.apache.cxf.interceptor.LoggingInInterceptor"/> <ref bea n= "Anotherinterceptor"/> </jaxws:inInterceptor> <jaxws:handlers> <ref bean= "Jaxwshandler" /> </jaxws:handlers> ≪jaxws:properties> <entry key= "mtom-enabled" value= "true"/> </jaxws:properties> </jaxws:cli Ent> </beans> <jaxws:client> child elements: Jaxws:ininterceptors: Interceptor, you must implement each should implement Org.apache.cxf.interceptor.Interceptor or Org.apache.cxf.phase.PhaseInterceptor |