jBPM sends whatever content you put in the message parts. How does your BPEL process create the content of the "parameters" part? Please post the relevant portions of your process only.
I found the problem.
The eclipse designer create the 'parameters' parts like this:
<bpws:to part="parameters" variable="atlasRequest"> <bpws:query queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116"><![CDATA[/ns0:sCountryISOCode]]></bpws:query> </bpws:to>
But the correct way is this:
The problem is fixed if I change this part, but I don't know why the eclipse designer uses 'query languages'.
I hope that this post can help someone whit the same problem.
From Spain, thank you very much Alejandro.
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" />
you access the part element; in this case, ns0:CapitalCity. In your second fragment:
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:
is the BPEL 1.1 reference for XPath 1.0. BPEL 2 replaced it with:
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.
PS. Saludos hasta España, tierra de Cides y Quijotes :-)
ok, now I'm officially curious... Quijotes I can find on the internet.. but cides is impossible to find... HEEEELLLLPPPP :-)
Ah, ok 'lords' and toads (i.e. someone with high pretences)
Now I can rest in peace (the coming night that is)