Friday, January 29, 2010

Processing request or response as String but with XML structure in BPEL

When the process has been designed(bad design as it is not bound to schema) to accept the request as a String which is in XML format, then development becomes difficult. Oracle BPEL has been developed to deal with request and responses that are bound to schemas and so offer rich XML data manipulation.

Let us see what needs to be done when the request is receved as a Strng in XML format. The string needs to be mapped to an XML element to simplify the processing of payload
  • Use oraext:parseEscapedXML() to read the XML to an Element. If you encounter any problem in this please check the namespace as suggested here.
If the request to another webservice needs to be in a String format(again bad design) then let us see the available options
  • getContentAsString() converts the XML to string but escapes the '<' but leaves the '>' intact.
  • oraext:get-content-as-string() converts to XML but escapes both '<' and '>'. In em console, view the raw xml. If you view in the HTML it looks fine. 
  • Use Java Embedding(this is covered in a separate blog)

1 comment:

  1. The information shared by the author is quite beneficial.I would appreciate if it could be more elaborate.Otherwise its a good article.
    what is sap ecc 6.0

    ReplyDelete