-1

I am trying to consume a SOAP API which is working fine from SOAPUI Tool but while calling it from Mule flow it shows blank result in POSTMAN, below is my flow xml anyone can help me please?

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

2 Answers2

0

You need to consume webservice consumer payload and transform it into a readable format. by default it will not print anything for you.

user3131897
  • 63
  • 2
  • 8
0

Make sure you select application/xml as content type in Postman or SOAP UI and select POST. Use CXF and select Operation as Proxy Service ,Provide details. Selct and provode (WSDL,MTOM enabled,SOAP Headers ,SOAP 1.2) Make sure you posting XML request "POST" method in allowed methods. Use 2 transformers. XML to DOM and DOM to XML. Log the request using

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

Use a groovy script transformer to retreive the entire payload.

def userSoapRequest = new XmlSlurper().parseText(payload);

def userId = userSoapRequest.userId.text();
message.setInvocationProperty('userId', userId);

6.Retrieve userId like above and similarly for all the elements. 7.Process them as you want.

Community
  • 1
  • 1
Kamal Vamsi
  • 128
  • 4
  • Now i have a SOAP web service with ws security username password while in SOAP UI i am calling this service and adding the outgoing ws-security configuration username password add nonce and add created and applying this WS in sending the request. Response is showing but how to do from Mule CXF. Well i know that mule web service consumer has this option but unfortunately i don't know that bu using thew ws consumer but flow doesn't deployed it shows failed and in console shows some WSDLUtils.java error. – Hatem Ahmed Sep 01 '18 at 16:19