【问题标题】:Mule Web Service Consumer MustUnderstand headerMule Web 服务使用者 MustUnderstand 标头
【发布时间】:2016-12-09 06:11:26
【问题描述】:

我已经构建了一个向外部 Web 服务使用者发送请求的流程。此服务已启用安全性,我已将其配置为这样

<ws:consumer-config name="Test_WS" wsdlLocation="test.wsdl" service="TestService" port="TestServicePort" serviceAddress="http://${service.host}:${service.port}/test/services" connectorConfig="HttpsConnector" doc:name="Web Service Consumer">
    <ws:security>
        <ws:wss-username-token username="${service.user}" password="${service.pwd}" passwordType="TEXT"/>
    </ws:security>
</ws:consumer-config>

发送请求时,抛出 SOAP 错误:

Root Exception stack trace:
org.mule.module.ws.consumer.SoapFaultException: Did not understand "MustUnderstand" header(s):. Message payload is of type: ElementNSImpl
at org.mule.module.ws.consumer.WSConsumer$1.processNext(WSConsumer.java:196)

有没有办法禁用 MustUnderstand 标头?谢谢。

【问题讨论】:

    标签: web-services soap mule cxf


    【解决方案1】:

    标题 mustUnderstand 的默认值为 true

    通过在调用 WebService Consumer 之前设置消息属性将此标头设置为 false。这应该可以解决这个问题。

    <set-property propertyName="mustUnderstand" value="false"/>
    

    【讨论】:

      猜你喜欢
      • 2011-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-21
      • 1970-01-01
      • 2016-11-01
      • 1970-01-01
      相关资源
      最近更新 更多