天天看點

Spring整合了CXF的一個applicationContext.xml的配置檔案

<?xml version="1.0" encoding="utf-8"?>

<a target="_blank" href="http://cxf.apache.org/schemas/jaxrs.xsd">http://cxf.apache.org/schemas/jaxrs.xsd</a>

<a target="_blank" href="http://cxf.apache.org/schemas/jaxws.xsd">http://cxf.apache.org/schemas/jaxws.xsd</a>

&lt;!-- 引入cxf bean定義如下 --&gt;

&lt;import resource="classpath:meta-inf/cxf/cxf.xml"/&gt;

&lt;!--已經可以不使用此項

&lt;import resource="classpath:meta-inf/cxf/cxf-extension-soap.xml"/&gt;

 --&gt;

&lt;import resource="classpath:meta-inf/cxf/cxf-servlet.xml"/&gt;

&lt;jaxws:server id="a"

     address="/helloworld"

     serviceclass="cn.itcast.server.helloworld"&gt;

&lt;jaxws:servicebean&gt;

 &lt;bean class="cn.itcast.server.helloworldimpl"&gt;&lt;/bean&gt;

&lt;/jaxws:servicebean&gt;

&lt;jaxws:ininterceptors&gt;

 &lt;bean class="org.apache.cxf.interceptor.loggingininterceptor"&gt;&lt;/bean&gt;

&lt;/jaxws:ininterceptors&gt;

&lt;jaxws:outinterceptors&gt;

 &lt;bean class="org.apache.cxf.interceptor.loggingoutinterceptor"&gt;&lt;/bean&gt;

&lt;/jaxws:outinterceptors&gt;

&lt;/jaxws:server&gt;

&lt;/beans&gt;