Hi I was exploring wsdl-cxf for consuming a web service ... I have the following Mule flow :-
<stdio:connector name="stdioConnector" promptMessage="Enter Value :" doc:name="STDIO"/>
<flow name="ServiceFlow" doc:name="ServiceFlow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP"/>
<cxf:jaxws-service serviceClass="com.test.services.schema.maindata.v1.MainData" doc:name="SOAP"/>
<component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl" doc:name="JavaMain_ServiceImpl"/>
</flow>
<flow name="inputService" doc:name="inputService" >
<stdio:inbound-endpoint system="IN" doc:name="STDIO"/>
<logger message="Payyyload : #[message.payload]" level="INFO" doc:name="Logger"/>
<outbound-endpoint address="wsdl-cxf:http://localhost:8082/mainData?WSDL&method=retrieveDataOperation" doc:name="Generic"/>
<stdio:outbound-endpoint system="OUT" doc:name="STDIO"/>
<mulexml:object-to-xml-transformer doc:name="Object to XML"/>
</flow>
Now the first flow ServiceFlow is the web service exposed which is working perfectly when the following input is given from SOAPUI :-
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://services.test.com/schema/MainData/V1">
<soapenv:Header/>
<soapenv:Body>
<v1:retrieveDataRequest>
<v1:Id>33</v1:Id>
</v1:retrieveDataRequest>
</soapenv:Body>
</soapenv:Envelope>
It fetch the data from DB and display the result ... The second flow inputService try to consume the service using wsdl-cxf ... Here I used stdio:inbound for taking the input .. Now when I pass the Data 33 as input .. it does not able to fetch the value from DB ... Now my web service implement class has the following method :-
public DataResponse retrieveDataOperation(
RetrieveRequest retrieveDataRequest)
{
//All the Logic here
}
where RetrieveRequest retrieveDataRequest is the Object type as input .. So how can I pass the value using wsdl-cxf here which may be taking a String request ... what I mean is how to use wsdl-cxf to consume a webservice and pass a value which is taking Object as parameter ... Please help ..