Hello,

I`m using camel ver. 2.10.4 and I want to create web service by using CXF
(contract-first approach) and I have two method (Add & Remove) in single
WSDL:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions name="AdditiveRoleEndpointService"
                  xmlns:nps="http://www.test.com/nest/schemas/AdditiveRole";
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
                 
targetNamespace="http://www.test.com/nest/schemas/AdditiveRole";>
    <wsdl:types>
        ...
        ...
    </wsdl:types>
    <wsdl:message name="AddRequest">
        <wsdl:part element="nps:AddRequest" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="AddResponse">
        <wsdl:part element="nps:AddResponse" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="RemoveRequest">
        <wsdl:part name="parameters" element="nps:RemoveRequest"/>
    </wsdl:message>
    <wsdl:message name="RemoveResponse">
        <wsdl:part name="parameters" element="nps:RemoveResponse"/>
    </wsdl:message>
    <wsdl:portType name="AdditiveRoleEndpoint">
        <wsdl:operation name="Add">
            <wsdl:input message="nps:AddRequest"/>
            <wsdl:output message="nps:AddResponse"/>
        </wsdl:operation>
        <wsdl:operation name="Remove">
            <wsdl:input message="nps:RemoveRequest"/>
            <wsdl:output message="nps:RemoveResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="AdditiveRoleBinding"
type="nps:AdditiveRoleEndpoint">
        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="Add">
            <soap:operation
soapAction="http://www.test.com/nest/schemas/AdditiveRole/Add"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="Remove">
            <soap:operation
soapAction="http://www.test.com/nest/schemas/AdditiveRole/Remove"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="AdditiveRoleEndpointService">
        <wsdl:port name="AdditiveRoleService"
binding="nps:AdditiveRoleBinding">
            <soap:address location="http://localhost:9000/additiverole"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


<cxf:cxfEndpoint id="serviceEndpoint"
                     address="http://localhost:9000/role";
                    
serviceClass="com.test.nest.schemas.additiverole.AdditiveRoleEndpoint"
                     wsdlURL="service.wsdl"
                     endpointName="s:AdditiveRoleService"
                     serviceName="s:AdditiveRoleEndpointService"
                    
xmlns:s="http://www.test.com/nest/schemas/AdditiveRole"/>

*Can I use something like SOAP action for specify CXF consumer for each
method from WSDL?*

<camel:route id="route-add">
    <camel:from uri="cxf:bean:serviceEndpoint?SOAPaction=Add"/>
    <camel:process ref="testingProcessor"/>
    ...
</camel:route>
<camel:route id="route-remove">
    <camel:from uri="cxf:bean:serviceEndpoint?SOAPaction=Remove"/>
    <camel:process ref="testingProcessor"/>
    ...
</camel:route>


Thanks for any advice or suggestions,

Martin



--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-consumer-by-soapAction-tp5731241.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to