Showing posts with label Oracle BPEL. Show all posts
Showing posts with label Oracle BPEL. Show all posts

Tuesday, 24 September 2019

Accessing HTTP header parameters to rest services in oracle bpel

One of the common requirement with rest services is to access/set the variable values in http header. In oracle SOA (BPEL) follow the below steps to access (for inbound rest) or set (for outbound) the HTTP header values,

For inbound rest service,

  • Open the Receive Input activity, click on properties tab and add property with below syntax and assign it to a variable in your bpel process.
rest.binding.http.<variable_name>

For outbound invocations,

  • Open the invoke rest activity, click on properties tab and add property with the same syntax as above and set the value of it from variable or expression.








Thursday, 7 May 2015

Handling CDATA in BPM Web Service call

The most common problem that we face while invoking a web service which expects some xml as a string in CDATA from oracle BPM/BPEL.
Like 

"<![CDATA[<UnderwriterAssignment><ApplicationID>XXXXXXXX</ApplicationID><Underwriter>XXXX</Underwriter></UnderwriterAssignment>]]>"

The above string has to be passed to the webservice as a string.

The problem here is the engine will convert the < and > to &lt; and &gt; while invoking. But the service may not be coded in such a ways that it accepts like that and the web service invokation will fail.

To resolve this, 

  • Prepared (assign) the string that needs to be sent as CDATA.
  • someString = "<UnderwriterAssignment><ApplicationID>ATL620007</ApplicationID><Underwriter>satishs</Underwriter></UnderwriterAssignment>"
  • On the service call use ora:toCDATA() to convert it into proper CDATA without encoding
  • like ora:toCDATA(someString).
This will not encode the string and it will pass as it is.