Camel cxf: cxfEndpoint Manufacturer error: cannot find BindingOperationInfo with operation name

I call the soap service using the camel cxf: cxfEndpoint, but I get this BindingOperationInfo error. The configuration looks right to me, but not sure where I'm doing it wrong.

Endpoint Configuration :

<!--  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>

The configuration of my Java DSL router .

from("direct:invokeMyUpdate")
        .bean("myAcctSvcClient", "buildSoapReq")
        .setHeader(CxfConstants.OPERATION_NAME, constant("getAccountInfo"))
        .to("cxf:bean:accountEndpoint")

WSDL Elements:

<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="" />
        <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>
</binding>

The following is the error:

StackTrace: java.lang.IllegalArgumentException: BindingOperationInfo {http://acct.poc.cog.com/} getAccountInfo. operationName operationNamespace.         at org.apache.camel.component.cxf.CxfProducer.getBindingOperationInfo(CxfProducer.java:379) [camel-cxf-2.16.0.jar: 2.16.0]         at org.apache.camel.component.cxf.CxfProducer.prepareBindingOperation(CxfProducer.java:211) [camel-cxf-2.16.0.jar: 2.16.0]          org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:110) [camel-cxf-2.16.0.jar: 2.16.0]          org.apache.camel.processor.SendProcessor.process(SendProcessor.java:141) [camel-core-2.16.0.jar: 2.16.0]

+4
1

:

<setHeader headerName="operationNamespace">
  <constant>http://acct.poc.cog.com/</constant>
</setHeader>

JAVA DSL :

from("direct:invokeMyUpdate")
    .bean("myAcctSvcClient", "buildSoapReq")
    .setHeader(CxfConstants.OPERATION_NAME, constant("getAccountInfo"))
    .setHeader(CxfConstants.OPERATION_NAMESPACE, constant("http://acct.poc.cog.com/"))
    .to("cxf:bean:accountEndpoint")

- CxfProducer.java:379. CxfProducer.client.conduitSelector.endpoint.binding.bindingInfo.operations.
, , wsdl, .

EDIT: , org.apache.cxf.endpoint.EndpointImpl org.apache.cxf.jaxws.support.JaxWsEndpointImpl . CxfEndpoint:

<cxf:cxfEndpoint
        id="id"
        ...
        serviceClass="service.class.name"
 >

service.class.name webservice , webservice.

+4

Source: https://habr.com/ru/post/1619305/


All Articles