Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Wso2 HTTP Method from POST to GET

Tags:

wso2

wso2-esb

How can i chnage the HTTP Method in wso2 esb using java class mediator currently I am using mc.setDoingGET(false); mc.setDoingPOX(true); I want to take a post request to ESB and then send to a webservice via GET or vice versa but the above code is not working at all

like image 753
behinddwalls Avatar asked Jun 04 '26 13:06

behinddwalls


2 Answers

Use the property mediator with property name: HTTP_METHOD and http method name as the value (GET,POST etc) and scope as 'axis2'.

like image 147
Kasun Indrasiri Avatar answered Jun 07 '26 23:06

Kasun Indrasiri


If you want to change this property in the java class level, you may do the following:

msgCtx.setProperty(Constants.Configuration.HTTP_METHOD, "GET");
like image 26
Riyafa Abdul Hameed Avatar answered Jun 07 '26 22:06

Riyafa Abdul Hameed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!