Camel转发WebService请求方法一:
前端为CXF,OSGI-INF/blueprint/blueprint.xml
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.1/blueprint.xsd">
<camelcxf:cxfEndpoint id="greetingService"
address="http://localhost:9080/greeting" endpointName="s:GreetingSoap"
serviceName="s:GreetingService" wsdlURL="wsdl/greeting.wsdl"
xmlns:s="http://demo.ceunfish.org/greeting" />
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<endpoint id="realWebService"
uri

本文介绍了两种使用Camel转发WebService请求的方法:一种是前端通过CXF,另一种是通过jetty。在CXF中,虽然能显示指定的WSDL,但SOAPAction为空时请求头会缺失该字段,可能导致AXIS开发的webservice报错;而jetty则能正确显示目标服务的WSDL,并在SOAPAction为空时保持请求头完整。
最低0.47元/天 解锁文章
2346

被折叠的 条评论
为什么被折叠?



