-1

I have created on flow in MuleESB which is calling a web-service without any parameter just sending it username, password and token in a property and it is working fine.

But the second API I want to post some parameters while calling soap request but I don't know how to use it I tried to pass through set payload but no response.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Please read https://stackoverflow.com/help/how-to-ask – Fabian S. Feb 13 '18 at 14:12
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Feb 13 '18 at 15:38
  • Engineer, may we see your code here, with your requests and responses presented also? – halfer Feb 13 '18 at 15:39

2 Answers2

0

use Webservice consumer and add a transform message component beofre it. by doing so you can automatically map all the parameters which are required by the SOAP webservice, as datasence will automaticall download the meta deta of the service using the WSDL file.

user3131897
  • 63
  • 2
  • 8
0
  1. 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)
  2. Make sure you posting XML request "POST" method in allowed methods.
  3. Use 2 transformers. XML to DOM and DOM to XML.
  4. Log the request using

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

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

Hope this helps

Kamal Vamsi
  • 128
  • 4