mule - web service consumer (soap) always returns null

谁都会走 提交于 2019-12-12 03:38:28

问题


I am using the Zuora soap API. I am attempting to perform a query. I don't get any errors but the results are always null when I output the payload to log. What am I doing wrong? (the query I provide below should return 320 records, which is what I get if I execute the same query in a local non-mule test script)

This is the section of the flow.

  1. I set the zoql query to flowVars (flowVars.query). For example : select id from Account WHERE updatedDate > '2016-06-24T23:00:00-06:00'
  2. I use dataweave to create the xml payload (dw provided below)
  3. I execute the query (web service consumer app xml details provided below)

DataWeave to set payload:

%dw 1.0
%output application/xml
%namespace ns0 http://api.zuora.com/
---
{
    ns0#query: {
        ns0#queryString: flowVars.query
    }
}

Web Service Consumer app xml

<ws:consumer config-ref="ZuoraWebServiceConsumer" operation="query" doc:name="query_zuora"/>

ZuoraWebServiceConsumer config details:

<ws:consumer-config name="ZuoraWebServiceConsumer" wsdlLocation="zuora.a.49.0-sandbox.wsdl" service="ZuoraService" port="Soap" serviceAddress="https://apisandbox-api.zuora.com" doc:name="Web Service Consumer">
    <ws:security>
        <ws:wss-username-token username="myusername.here" password="mypassword.here" passwordType="TEXT" />
    </ws:security>
</ws:consumer-config>

And the WSDL: https://www.dropbox.com/s/fkrppvv7i5s1a4w/zuora.a.49.0-sandbox.wsdl?dl=0


回答1:


After working with MuleSoft Support, it was discovered there is a bug with the Zuora connector. When Zuora returns an invalid session error, the Zuora connector is not catching it, destroying the connection from the pool, and initiating a new connection. MuleSoft has confirmed the bug.



来源:https://stackoverflow.com/questions/38104288/mule-web-service-consumer-soap-always-returns-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!