Title
"XPath query string returns zero node."

Date
2009-04-03

Summary
The Transform activity in a BPEL process may fail due to the following exception:
    "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
      <part name="summary">
        <summary>
          XPath query string returns zero node.
          According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node.
          Please check the BPEL source at line number "81" and verify the <to> part xpath query.
          Possible reasons behind this problems are: some xml elements/attributes are optional or the xml data is invalid
    according to XML Schema.
          To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain
          administration page.
        </summary>
      </part>
    </selectionFailure>

Details
1. In the case of the error above, this was due to an Assign activity being performed immediately after a Transform activity. The Assign was attempting to update an element not being transformed in the previous Transform (i.e., the element was effectively null).

a. Edit the transformation, right-click on the element that the Assign activity in the next step will update.

b. Select Set Text.

c. Set a temporary value (e.g., 'PLACEHOLDER'). This will be overwritten by the Assign activity anyway.

Applicable Versions
Oracle SOA Suite 10g (10.1.3)
Ahmed Aboulnaga

.com .com