为Tomcat配置jax rpc Handler

时间:2016-01-21 13:47:47

标签: tomcat jax-rpc

我的项目使用javax.xml.rpc.handler.Handler接口来处理收到的xml。我使用weblogic。现在我转向tomcat并且只想使用javax.xml.rpc模型。

你能帮助我理解如何配置我的邮件类和处理程序配置,以便在tomcat上部署后,tomcat处理请求。

我的web.xml

<web-app>
<security-constraint>
 <display-name></display-name>
 <web-resource-collection>
 <web-resource-name>ABC</web-resource-name>
<description>Resources to be placed under security control.</description>
<url-pattern>MyService</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>myrole</role-name>
</auth-constraint>
<user-data-constraint>
<description>SSL required</description>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint> 
</web-app>

网络的services.xml

<web-services xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<handler-chains>
 <handler-chain name="MyHandlerChain">
    <handler class-name="com.x1.x2.ServerHandler">        
     </handler>
 </handler-chain>       
</handler-chains>

<web-service protocol="https" name="MyService" targetNamespace="http://www.myproject.com/myservice" uri="/MyService">
<components>
  <java-class name="MyService" class-name="com.x1.x2.MyService" />
</components>
<operations>
  <operation method="sendRequestAttachment" handler-chain="MyHandlerChain" component="MyService">
    <params>
      <param name="param" style="in" type="xsd:string" />
      <return-param name="result"  type="xsd:string" />
    </params>
  </operation> 
</operations>
</web-service>
</web-services>

0 个答案:

没有答案