Index Changes

Normalized Message Header Access within BPEL

Use cases

Soap headers

  1. Information sent in the soap envelope as part of the soap header is lost if there is no binding for this soap header to the abstract message part.
  2. Web service developers want the capability to send the soap headers when their service calls external services.

Unique Message Identifiers

  1. identifiers sent in use cases like Reliability

Transport protocol headers

  1. File headers in case of File BC
  2. HTTP headers in case of HTTP BC

Dynamic configuration of endpoint properties

  1. Enrichment of the endpoint - Provide additional properties for the end point that were not defined statically in the WSDL.
    1. File BC service can append to file while the service definition maynot have hinted it.
  2. Override the static endpoint properties
    1. JMS BC can query and dynamically send “User name” and “password”

Correlation values

  1. To suit requirements where the correlation values comes as part of the transport and not as part of the service.

User defined custom properties

  1. custom properties that users may define and want to access them as part of their integration

Design

Normalized message header design

Refer Normalized Message Header design before continuing to read the BPEL SE specific design.

BPEL syntax design

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

  • The editor needs to know all the different properties of all the different BCs. The way to solve this could be using BPEL editor plugin NBMs. All BCs which want their properties to be displayed in the editor will come up with a NBM plugin that the user will install. This should be taken care of the released version of product as well.
  • The editor will ask the user to provide the xsd for the soap:header (or other header) properties to help the user construct the query, and type information can be stored as additional attributes on the propertyAlias. Further refining of the usability is needed. What if the user didn't want to import the XSD? but just for the query construction he provided the XSD location. When editor generates property and propertyAlias it needs to persist them to WSDL file, it would be similar to correlation wizard.
BPEL Editor support

Persistence

Check back in two weeks for this story

Validation

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.

BPEL samples can be found at BPELAdvancedConstructs under NM-Property category.

direct link to java.net location

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-30) was last changed on 23-Dec-08 20:37 PM, -0800 by Murali