brijesh wrote:
hello ,
I need to know how to configure wsdl operations in cxf-bc xbean,

the following is scenario wsdl having portype as follows
           <wsdl:portType name="ContractPortType">
                <wsdl:operation name="createContract">
                        <wsdl:input message="eka:createContractRequest" />
                        <wsdl:output message="eka:createContractResponse" />
<wsdl:fault name="fault"
message="eka:createContract_faultMsg1"></wsdl:fault>
        </wsdl:operation>
                <wsdl:operation name="modifyContract">
                        <wsdl:input 
message="eka:modifyContractRequest"></wsdl:input>
                        <wsdl:output 
message="eka:modifyContractResponse"></wsdl:output>
<wsdl:fault name="fault"
message="eka:modifyContract_faultMsg1"></wsdl:fault>
        </wsdl:operation>

    </wsdl:portType>

the following service for the above port
            <wsdl:service name="ContractService">
             <wsdl:port binding="eka:ContractBinding" 
name="ContractServicePort">
                <soap:address location="http://localhost:8092/ContractService"; 
/>
                </wsdl:port>
        </wsdl:service>

cxf-bc configureation as follows

 <cxfbc:consumer wsdl="classpath:contract.wsdl"
        service="eka:ContractService"
        targetService="eka:contractBeanRouter"
useJBIWrapper="false" useSOAPEnvelope="false"
      />

above xbean i can configure only one targetService, but service client can
make call to createContract and modifyContract operations(see the above wsdl
operations declaration in port type), both calls are going to same
targetService. wondering is there any way to configure multiple targetService based on my
wsdl operation?? like createContract should have contractBeanRouter ,
modifyContract should have modifyContractBeanRouter as targetService?.
i can't define one more cxfbc conf with same service with different target
space, it gives error as duplicate endpoint defined
For your case, you want route to different target Service based on different operation. You can archieve it by using servicemix-eip or servicemix-camel, something like content based routing
The flow looks like

external client ====> cxf bc consumer====> servicemix-eip or servicemix-camel ====> your different target service based on different operation.

Freeman
Any idea on this

thanks Brijesh N K

Reply via email to