Mule cxf客户端和wcf服务交互

时间:2015-04-16 17:27:48

标签: web-services wcf mule esb

我有像

这样的工作流程
<flow name="testmulewcfFlow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/GetData" doc:name="HTTP"/>
    <set-payload value="#[message.inboundProperties.'http.query.params'.value]" doc:name="Set Payload"/>
    <cxf:jaxws-client port="CXFWebservicePort" operation="GetData" serviceClass="com.mulesoft.wcfconsumer.IService1" doc:name="CXF"/>
    <object-to-string-transformer doc:name="Object to String"/>
</flow>

非常简单的wcf服务,我想从mule anypoint studio中使用

public class Service1 : IService1
    {
        public string GetData(string value)
        {
            return string.Format("You entered: {0}", value);
        }
    }

但是当我拨打电话时:http://localhost:8081/GetData?value=hello 我收到错误: 发现了意外的包装器元素{http://tempuri.org/} GetData。预期{http://tempuri.org/} GetDataResponse ..无法通过端点路由事件:org.mule.module.cxf.CxfOutboundMessageProcessor。消息有效内容的类型为:PushbackInputStream

我做错了什么?

1 个答案:

答案 0 :(得分:0)

由于在cxf:jaxws-client之后未在末尾实施出站端点而面临的问题 在末尾放置一个外部绑定端点,使用http:request组件调用外部Web服务: - http://www.mulesoft.org/documentation/display/current/HTTP+Connector

相关问题