Skip to main content

Hi,

I am trying create SOAP Action value in HTTP Request headers in Transform Message process using dataweave 2 to call a webservice.

I have selected Attributes tab in Output section of Transform Message Process and used below dw code.

%dw 2.0

output application/java

---

{

HttpRequestAttributes:{

headers:{

soapaction: "login"

}}

}

I am new to mulesoft. Please let me know if you need more details.

Thanks

2 respuestas
  1. 19 dic 2019, 22:47

    You do not need to put things into attributes in mule 4 to pass them to a connector operation. Look instead for the input field on the thing you're using and do an "in line dataweave transformation" to create the structure.

     

    In your case you should be using the "web service consumer" connector instead of building something with HTTP - once you've added that from exchange to your project - go to the Web Service Consumer's "consume" operation and you'll see the input fields.. Use the UI to build up the required dataweave for things like headers (which will be essentially a structure with key/value pairs).

     

    Would HIGHLY suggest you enrol in training or do the self paced course though to wrap your head around concepts of mule 4 - as fumbling around is going to mean you take forever. Mule U - fundamentals is available here (free): https://training.mulesoft.com/course/mulesoftu-fundamentals4

     

    Or there are instructor led options available (paid).

0/9000