Agus,
The to variant with variable, part and query items is correct as well. This form comes
from the BPEL 1.1 days when the $ notation for accessing variables did not exist yet.
The difference lies in the '/' preceding your query. When you write:
<to variable="atlasRequest" part="parameters" />
or
<to>$atlasRequest.parameters</to>
you access the part element; in this case, ns0:CapitalCity. In your second fragment:
<bpws:to>$atlasRequest.parameters/ns0:sCountryISOCode</bpws:to>
ns0:sCountryISOCode is relative to ns0:CapitalCity. However, in your first fragment:
<bpws:to part="parameters" variable="atlasRequest">
| <bpws:query><![CDATA[/ns0:sCountryISOCode]]></bpws:query>
| </bpws:to>
the leading slash makes the location path absolute. Instead of appending
ns0:sCountryISOCode to the ns0:CapitalCity element, you are appending to the owner
document of ns0:CapitalCity! Because the owner document already has ns0:CapitalCity as its
root element, appending another element should result in a fault.
The following code essentially performs the same operations that jBPM performs to evaluate
a query on a part element.
Element capitalCity = XmlUtil.createElement("capitalCity");
|
| Query query = new Query();
| query.setText("/countryIsoCode");
|
| query.getEvaluator().assign(capitalCity, "MX");
|
| assertEquals("capitalCity",
capitalCity.getOwnerDocument().getDocumentElement().getLocalName());
The code throws a BpelFaultException from the assign() call.
Regarding the query language, the URI:
anonymous wrote :
http://www.w3.org/TR/1999/REC-xpath-19991116
is the BPEL 1.1 reference for XPath 1.0. BPEL 2 replaced it with:
anonymous wrote : urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0
The Eclipse designer should be using the latter reference.
Since XPath 1.0 is the default language, you are better off removing the queryLanguage
attribute.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024774#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...