【问题标题】:MULE ESB CALLING SOAP API SHOWS BLANKMULE ESB 调用 SOAP API 显示空白
【发布时间】:2018-02-15 08:42:10
【问题描述】:

我正在尝试使用在 SOAPUI 工具中运行良好的 SOAP API,但是在从 Mule 流中调用它时,它在 POSTMAN 中显示空白结果,下面是我的流 xml,任何人都可以帮助我吗?

<flow name="xxxx">
<http:listener config-ref="HTTP_Listener_Configuration" path="/xxxx" allowedMethods="POST" doc:name="HTTP"/>
<set-property propertyName="APIKey" value="xxxx-xxxx-xxxx-xxxx-xxxx" doc:name="Property"/>
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/xml
%namespace ns0 http://localhost/eDetails:eDetailsWSD
---
{
ns0#eDetails: {
eDReq: {
IDEmp: "",
AllEmp: ""
}
}
}]]></dw:set-payload>
</dw:transform-message>
<ws:consumer config-ref="Web_Service_Consumer" operation="eDetails" doc:name="Web Service Consumer"/>
</flow>

【问题讨论】:

    标签: web-services mule postman anypoint-studio mule-esb


    【解决方案1】:

    您需要使用 Web 服务消费者有效负载并将其转换为可读格式。默认情况下,它不会为您打印任何内容。

    【讨论】:

      【解决方案2】:

      确保在 Postman 或 SOAP UI 中选择 application/xml 作为内容类型,然后选择 POST。使用 CXF 并选择 Operation as Proxy Service ,提供详细信息。选择和提供(WSDL,启用 MTOM,SOAP 标头,SOAP 1.2) 确保在允许的方法中发布 XML 请求“POST”方法。 使用 2 个变压器。 XML 到 DOM 和 DOM 到 XML。 使用

      记录请求

      [message.payloadAs(java.lang.String)]

      使用 groovy 脚本转换器来检索整个有效负载。

      def userSoapRequest = new XmlSlurper().parseText(payload);
      
      def userId = userSoapRequest.userId.text();
      message.setInvocationProperty('userId', userId);
      

      6.Retrieve userId 像上面一样,对于所有元素也是如此。 7.根据需要处理它们。

      【讨论】:

      • 现在我有一个带有 ws 安全用户名密码的 SOAP Web 服务,而在 SOAP UI 中我正在调用此服务并添加传出 ws-security 配置用户名密码添加 nonce 并添加创建并在发送时应用此 WS请求。响应正在显示,但如何从 Mule CXF 做。好吧,我知道 mule Web 服务使用者具有此选项,但不幸的是,我不知道使用 thew ws 使用者但未部署流程的 bu 显示失败,并且在控制台中显示一些 WSDLUtils.java 错误。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多