我是一个初学者,我有一个骡子流,在这个流程中,我想把SOAP服务操作称为有4个输入参数的“公共双calculateInterest(双主体,双年,双速率,int )”。
我尝试使用一个文件或http端点,在使用set有效负载时,我最终使用字符串数组或对象数组。引发的异常是
无法转换为java.lang.Double。通过端点路由事件失败: org.mule.module.cxf.CxfOutboundMessageProcessor.消息有效载荷类型为: String[]
有人能给我建议最好的方法吗。
发布于 2014-04-01 17:58:39
您可以配置文件或http入站,编写java组件(删除cxf组件),从有效负载中提取参数,按所需类型强制转换,并从组件调用web服务方法。
发布于 2014-04-01 15:28:50
下面是一个简单的webservice示例:-
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="CE-3.3.0" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
<flow name="getCalculationFlow1" doc:name="getCalculationFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="getCalculation" doc:name="HTTP"/>
<cxf:jaxws-service serviceClass="com.services.getcalculation.v1.GetCalculation" doc:name="SOAP"/>
<component class="com.services.schema.getcalculation.v1.GetCalculationImpl" doc:name="Java"/>
</flow>
</mule>其中,com.services.getcalculation.v1.GetCalculation是使用Apache 从WSDL文件生成的and服务类,而com.services.schema.getcalculation.v1.GetCalculationImpl是and服务的嵌入类.希望能帮上忙
https://stackoverflow.com/questions/22785994
复制相似问题