【问题标题】:Mule cxf client and wcf service interactionMule cxf客户端和wcf服务交互
【发布时间】:2015-04-17 02:21:55
【问题描述】:

我有这样的工作流程

<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>

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

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

我做错了什么?

【问题讨论】:

    标签: web-services wcf mule esb


    【解决方案1】:

    由于在cxf:jaxws-client 之后最后没有实现出站端点,您所面临的问题 最后放置一个出站端点,它将使用 http:request 组件调用您的外部 Web 服务:- http://www.mulesoft.org/documentation/display/current/HTTP+Connector

    【讨论】:

    • 我插入了 并出现“发送 HTTP 请求时出错。消息负载的类型为:byte[]" 是否需要在负载之后放置任何转换器?
    • 您可以尝试使用字节到字符串转换器并检查它是否有效
    猜你喜欢
    • 2016-07-28
    • 1970-01-01
    • 1970-01-01
    • 2015-12-25
    • 2015-08-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-27
    相关资源
    最近更新 更多