我使用Camel作为客户端和Web服务之间的代理 . 目的是丰富客户端在将其转发到真实Web服务之前发送的SOAP请求 .
我想用 生产环境 者 endpoints (真实Web服务的 endpoints )注册名为sessionJAXWSHandler的JAX-WS(协议)处理程序,但它似乎没有选择它 . 如果我在传入的enpoint上配置相同的处理程序,它会注册处理程序;我可以看到调试 . 我相信same problem is described here但它从未解决过 .
My Spring-based Camel configuration :
用于处理传入SOAP消息的CXF endpoints - 处理程序注册正常:
<cxf:cxfEndpoint id="hotelAvailabilityService"
address="/HotelAvailabilityService"
serviceClass="com.booking.hotel.availability.HotelAvailability"
wsdlURL="wsdl/MyHotelAvailabilityProxyService.wsdl">
<cxf:handlers>
<ref bean="sessionJAXWSHandler"/>
</cxf:handlers>
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD" />
<entry key="schema-validation-enabled" value="false" />
</cxf:properties>
</cxf:cxfEndpoint>
传出请求的CXF endpoints (我看不到任何调试,所以我假设处理程序尚未注册. There are no error messages ):
<cxf:cxfEndpoint id="realHotelAvailabilityService"
address="https://com.company.webservice/availabilityws"
wsdlURL="wsdl/hotelbooking.wsdl"
loggingFeatureEnabled="true"
>
<cxf:handlers>
<ref bean="sessionJAXWSHandler"/>
</cxf:handlers>
<cxf:inInterceptors>
<ref bean="unZip"/>
</cxf:inInterceptors>
<cxf:inFaultInterceptors>
<ref bean="unZip"/>
</cxf:inFaultInterceptors>
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD" />
<entry key="schema-validation-enabled" value="false" />
</cxf:properties>
</cxf:cxfEndpoint>