brijesh wrote:
thanks a lot Freeman for clarifying my doubts, yea i understand that even if
a portType having multiple operations will allways have single targetService
in cxf-bc.
But when a client generated through wsdl having portType with multiple
operations. It will have multiple method, client can call this method, but i
hope cxf-bc will still route it to a single targetService for any of this
method called by client , when we configure this service(with portType with
multiple opreration) cxf-bc will not throw any error.
Yeah, of course cxf bc support one portype with multiple operations.
The method identification and dispatch is based on the service model (which is generated from the wsdl model), so you needn't worry about the multiple operations issue yourself.
but I was wodering how cxf-bc will take care schema validation. Each
operation will have different in/out parameter, if we need to validate
schema how will cxf-bc take care, can we have multple schema validation for
a single cxf-bc end points???
I can't follow what you mean here about multiple schema validation.
But of course you can import multiple xsd files into your wsdl, which will be used for schema validation if you turn the schemaValidation on, something like
<jaxws:endpoint name="{http://apache.org/hello_world_soap_http}SoapPort";
wsdlLocation="wsdl/hello_world.wsdl"
createdFromAPI="true">
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
</jaxws:endpoint>

Freeman



thanks Brijesh N K





Freeman Fang wrote:
brijesh wrote:
thanks freeman for the response , I do understand by using cxf-camel , i can route the to different targetService.
But my doubt is , based on wsdl & porttype operation is there a
possibility
in cxf-bc xbean to give different targetService? Something like , matching service name in wsdl with cxf-bc service
attribute, is there any way to match portType operation in wsdl & cxf-bc
to
match and pass the message to different targetService??

No.
The relationship between service porttype and operation is

service--->porttype -- operation1
                              |---operation2
                              |----operation n
there is noway cxf can route different message based on operation to different targetService, since only one targetService could be defined for cxf bc consumer. CBR should be taken care of by servicemix-eip or servicemix-camel

One way is you can split your wsdl, define two portType and two service, each portType have different operation, and use two cxf bc consumers.

Freeman

Thanks Brijesh N K



Freeman Fang wrote:
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