【发布时间】:2014-08-20 02:17:42
【问题描述】:
您好,我正在探索 wsdl-cxf 以使用 Web 服务...我有以下 Mule 流程:-
<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>
现在,第一个流 ServiceFlow 是公开的 Web 服务,当 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>
它从数据库中获取数据并显示结果... 第二个流程 inputService 尝试使用 wsdl-cxf 来使用服务......这里我使用 stdio:inbound 来获取输入......现在当我将 Data 33 作为输入传递时......它无法从 DB 中获取值......现在我的 Web 服务实现类具有以下方法:-
public DataResponse retrieveDataOperation(
RetrieveRequest retrieveDataRequest)
{
//All the Logic here
}
其中 RetrieveRequest retrieveDataRequest 是作为输入的 Object 类型。那么我如何在这里使用 wsdl-cxf 传递值,这可能是一个字符串请求...我的意思是如何使用wsdl-cxf 使用 Web 服务并传递一个将 Object 作为参数的值...请帮助..
【问题讨论】:
标签: mule mule-studio mule-component