The lost (collaxa) BPEL-tutorials: Tutorial 3: Manipulating XML Documents in BPEL

There is a nice tutorial for all xml beginners. You can download this document here.
I just copied some headlines from the table of contents, which should be known by every BPEL developer:

  • Manipulating Arrays
  • Statically Indexing into an Array
  • Determining Array Size
  • Dynamically Indexing into an Array
  • Dynamically indexing by Constructing an XPath at Run Time
  • Dynamically Indexing with the BPEL getElement Function
  • Merging Arrays
  • Appending New Items to an Array
  • Converting From a String to an XML Element
  • Differences for RPC-style WSDL Files

Initializing a Variable with Literal XML was shown in 103.XMLDocuments.
To start with arrays you can try the tutorial 112.Arrays.

The size of an array can be evaluated with this expression:

<from expression="ora:countNodes('output', 'payload','/invoice/lineItems/item')"/>
<to variable="lineItemSize"/>

To convert excaped XML to a variable the following snippet is very useful:

<from expression="ora:parseEscapedXML('
<item xmlns="http://samples.otn.com"sku="006">
<description>sun ultra sparc VI server</description>
<to variable="escapedLineItem"/>

The opposite can be done with ora:getContentAsString().

Keine Kommentare:

Kommentar veröffentlichen