Friday, September 14, 2012

SOAP envelope/body/header manipulation in BPEL 11g

We had some stringent requirement for one of the SOAP based web service, e.g.
  • custom soap header element needed to have mustUnderstand flag. 
  • In soap body we had some xsd:any with no namespace, and it is very hard to work with XSD any in BPEL 
So here is the approach which worked like a charm, and probably can be used where we need to have full control over SOAP envelope. Basically, use HTTP binding. Steps:

  • Created HTTP Binding as following

  •  Assigned entire soap envelope as I wanted to envelope variable using oraext:parseEscapedXML

<soapenv:Envelope xmlns:soapenv="" xmlns:prov="">
      <wsa1:OIMUser soapenv:mustUnderstand="0" xmlns:wsa1="">
      <m:processRequest xmlns:m="">
            <addRequest returnData="everything" xmlns="urn:oasis:names:tc:SPML:2:0" xmlns:dsml="urn:oasis:names:tc:DSML:2:0:core">


  •  Upon return we can directly get Body or entire Envelope using

Code Download