Thanks for the reply Kevin. In my case, I want the axis2MessageContext to be available for the script mediator because script mediator is the one used when creating prototype APIs in API manager. As you have suggested, I can use the property mediator. But, it has to be done after publishing the api (i.e. I have to edit the api xml). Problem with this is, when we republish the api, these changes gets vanished and I have to redo them. And, in my case, user does not have access to the file system to edit the api xml. Thats why I was trying to do this via the script mediator and api publisher UI.
Regards, Amila. On Mon, Oct 12, 2015 at 6:02 PM, Kevin Ratnasekera <[email protected]> wrote: > Hi Amila, > I have gone through the script mediator code/config, I dont think we might > able to access axis2MessageContext other than the SynapseMessageContext. > Can't we use either Property mediator or class mediator in this specific > use case? > Regards > Kevin > > On Mon, Oct 12, 2015 at 2:23 PM, Amila Maha Arachchi <[email protected]> > wrote: > >> Hi, >> >> I want to set a property in axis2MessageContext from the script mediator >> in ESB or API Manager. According to the doc [1], script mediator has not >> exposed the axis2MessageContext to the script mediator. >> >> $Subject? >> >> My original requirement is to set a response code for a resource of a >> prototyped api on api manager. There is a property named HTTP_SC which >> needs to be set in axis2MessageContext. >> >> [1] https://docs.wso2.com/display/ESB480/Script+Mediator >> >> Regards, >> Amila. >> >> -- >> *Amila Maharachchi* >> Senior Technical Lead >> WSO2, Inc.; http://wso2.com >> >> Blog: http://maharachchi.blogspot.com >> Mobile: +94719371446 >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > -- *Amila Maharachchi* Senior Technical Lead WSO2, Inc.; http://wso2.com Blog: http://maharachchi.blogspot.com Mobile: +94719371446
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
