WS-BPEL uses properties in two formats, extensions are added to these formats for supporting access to Normalized Message properties. Examples as per specification and using extension are illustrated side by side for better understanding.
WS-BPEL snippets showing usage of property defined in the WSDL
<from variable="variable1" property="ns0:stringProp"/>
getVariableProperty('variable1', 'ns0:stringProp')
property "stringProp" is defined in the WSDL document. It has two parts. A- property definition, B- one or more property alias definitions, more than one property alias is required when property is referring to more than one type (message/xsd)
<vprop:property name="stringProp" type="xsd:string"/>
<vprop:propertyAlias propertyName="tns:stringProp" messageType="tns:message" part="part1">
<vprop:query>/ns0:person/name</vprop:query>
</vprop:propertyAlias>
message's part1 is defined as "person" element in the following schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://localhost/person"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://localhost/person">
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element ref="tns:birthdate"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="birthdate">
<xs:complexType>
<xs:sequence>
<xs:element name="month" type="xs:string" />
<xs:element name="day" type="xs:int" />
<xs:element name="year" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Both from & getVariableProperty evaluate person's name element in the document.
WS-BPEL extension to support access to headers.
First version adds extension to propertyAlias element in WSDL
<vprop:propertyAlias propertyName="tns:stringProp"
nmProperty="org.glassfish.openesb.jms.destination">
</vprop:propertyAlias>
and second version adds extension to from/to elements and getVariableProperty in WS-BPEL also known as in-line
<from variable="xsdStringVariable" nmProperty="org.glassfish.openesb.jms.destination"/>
getVariableProperty('xsdStringVariable', 'org.glassfish.openesb.jms.destination')
When Normalized Message property value is MAP or document fragment, users needs to use propertyAlias's query element to access the node they are interested by defining xpath query. query is not supported in the in-line version of the syntax.
Accessing SOAP header Property name is "org.glassfish.openesb.headers.soap". Let us assume one of the SOAP header is a document as per Person schema.
<vprop:propertyAlias propertyName="tns:propertyName1"
nmProperty="org.glassfish.openesb.headers.soap"
messageType="tns:simpleCorrelation1Message"> => optional message attribute, if provided will just be a hint for editor validation and optimization for runtime.
<vprop:query xmlns:ns0="http://localhost/person">/ns0:person</vprop:query> => optional query element is to identifying the header & to drill down to the node user is interested. If user is interested in name query would be /ns0:person/ns0:name
</vprop:propertyAlias>
Accessing HTTP header Property name is "org.glassfish.openesb.headers.http"
<vprop:propertyAlias propertyName="tns:propertyName1"
nmProperty="org.glassfish.openesb.headers.http"
messageType="tns:simpleCorrelation1Message"> => optional message attribute, if provided will just be a hint for editor validation and optimization for runtime.
<vprop:query >/Content-Type</vprop:query> => optional query element is to identifying the header & value is string so it is invalid do drill down. Runtime would return the value or throw standard fault based on the query reslt.
</vprop:propertyAlias>
On the BPEL Editor side
Validation helps BPEL developers to avoid common mistakes and for a robust tool support. Validation is like compilation. Validation rules for this feature are found here.
direct link to java.net location