Hi Miyuru, Just a question. can't we make the target an XPath expression? That way you can modify any part of the envelope AFAIU.
WDYT? Thanks, Senaka. On Wed, Jan 16, 2013 at 2:49 PM, Miyuru Wanninayaka <[email protected]>wrote: > Hi all, > > Currently Payload factory mediator only supports generating content of > SOAP body and there is no way to create full SOAP message with SOAP headers > using payload factory mediator. > > How about implementing this? > > option 1. We can add a attribute to payload factory mediator to define > whether result need to set as SOAP enveloper / SOAP body > > <payloadFactory target="envelope | body> > <format> > <soapenv:Envelope xmlns:soapenv=" > http://www.w3.org/2003/05/soap-envelope"> > <soapenv:Header> > <foo> > <bar>?</bar> > </foo> > </soapenv:Header> > <soapenv:Body> > <request>?</request> > </soapenv:Body> > </soapenv:Envelope> > </format> > </payloadFactory> > > option 2. In payloadFactory, check for structure of message. If it is a > SOAP envelope, set as mc.setEnvelope(), else set as content of existing > message's body. > > I prefer option#2 because, because no need to add 1 more attribute to > payloadFactory config. > > WDYT? > > -- > Miyuru Wanninayaka > Senior Software Engineer - WSO2 Inc <http://wso2.com/>.
