-
1. Re: Problem BPEL: SOAP Messages in a web service invocation
aguizar Mar 1, 2007 5:54 PM (in response to agusgr)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.
-
2. Re: Problem BPEL: SOAP Messages in a web service invocation
agusgr Mar 2, 2007 3:00 AM (in response to agusgr)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:<bpws:to>$atlasRequest.parameters/ns0:sCountryISOCode</bpws:to>
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.
Agus -
3. Re: Problem BPEL: SOAP Messages in a web service invocation
aguizar Mar 2, 2007 5:52 PM (in response to agusgr)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:http://www.w3.org/TR/1999/REC-xpath-19991116
is the BPEL 1.1 reference for XPath 1.0. BPEL 2 replaced it with: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. -
4. Re: Problem BPEL: SOAP Messages in a web service invocation
aguizar Mar 2, 2007 5:53 PM (in response to agusgr)PS. Saludos hasta España, tierra de Cides y Quijotes :-)
-
5. Re: Problem BPEL: SOAP Messages in a web service invocation
kukeltje Mar 5, 2007 7:39 AM (in response to agusgr)ok, now I'm officially curious... Quijotes I can find on the internet.. but cides is impossible to find... HEEEELLLLPPPP :-)
-
6. Re: Problem BPEL: SOAP Messages in a web service invocation
aguizar Mar 5, 2007 9:08 AM (in response to agusgr)http://en.wikipedia.org/wiki/El_Cid
Anything goes in this forum, from sarcastic jokes to cultural references :-) -
7. Re: Problem BPEL: SOAP Messages in a web service invocation
kukeltje Mar 6, 2007 9:29 AM (in response to agusgr)Ah, ok 'lords' and toads (i.e. someone with high pretences)
Now I can rest in peace (the coming night that is)