我使用camel cxf:cxfEndpoint调用soap服务,但是收到此BindingOperationInfo错误.配置对我来说是正确的,但不知道我做错了什么.
端点配置:
<!-- Soap Client -->
<cxf:cxfEndpoint id="accountEndpoint" address="http://localhost:3333/wspoc/user"
wsdlURL="/wsdl/userSvc.wsdl"
serviceClass="com.cog.poc.acct.HelloWorldImplService"
endpointName="ws:HelloWorldImplPort"
serviceName="ws:HelloWorldImplService"
xmlns:ws="http://acct.poc.cog.com/" loggingFeatureEnabled="true">
<cxf:properties>
<entry key="dataFormat" value="POJO"/>
</cxf:properties>
</cxf:cxfEndpoint>
Run Code Online (Sandbox Code Playgroud)
我的Java DSL路由器配置.
from("direct:invokeMyUpdate")
.bean("myAcctSvcClient", "buildSoapReq")
.setHeader(CxfConstants.OPERATION_NAME, constant("getAccountInfo"))
.to("cxf:bean:accountEndpoint")
Run Code Online (Sandbox Code Playgroud)
WSDL元素:
<definitions targetNamespace="http://acct.poc.cog.com/"
name="HelloWorldImplService" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://acct.poc.cog.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<service name="HelloWorldImplService">
<port name="HelloWorldImplPort" binding="tns:HelloWorldImplPortBinding">
<soap:address location="http://localhost:3333/wspoc/user" />
</port>
</service>
<binding name="HelloWorldImplPortBinding" type="tns:HelloWorld">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
<operation name="getHelloWorldAsString">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" namespace="http://acct.poc.cog.com/" />
</input>
<output>
<soap:body use="literal" namespace="http://acct.poc.cog.com/" />
</output>
</operation>
<operation name="getAccountInfo">
<soap:operation soapAction="" /> …Run Code Online (Sandbox Code Playgroud)