1
votes

I need to build message in proxy on wso2 esb 4.8.1 with MessageType="multipart/form-data" and send to http endpoint.

Somethin like this:

POST /cgi-bin/maillist.cgi HTTP/1.0
Content-type: multipart/form-data; boundary=---------------------------7cd1d6371ec
Cache-Control: no-cache
Content-Length: 25852

-----------------------------7cd1d6371ec
Content-Disposition: form-data; name="realname"

Steve Johnson
-----------------------------7cd1d6371ec
Content-Disposition: form-data; name="email"

[email protected]

Could you give me just examlpe or link to solution?

2

2 Answers

1
votes

You can Set message type property as follows.

<property name="messageType" value="multipart/form-data" scope="axis2"/>

So it will invoke the multipart/form-data formatter and send out as a multipart/ form-data message.

0
votes

You can use builder mediator(https://docs.wso2.com/display/ESB481/Builder+Mediator) for this purpose. Builder mediator will build the message within WSO2 ESB such that the message is converted to the desired Content-Type.