Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
I have a BPEL process that makes use of flexible assigns (the insertMissingToData attribute as documented http://ode.apache.org/flexible-assigns.html) for generating outgoing messages. The flexible assigns functionality doesn't work on variables of message type, so I had to apply the patch from Ode JIRA https://issues.apache.org/jira/browse/ODE-672 to make it work.
I've also discovered that I have to switch to XPath 2.0 language for queries and expressions in order to make flexible assigns work:
<bpws:process exitOnStandardFault="yes" name="ProcessName" suppressJoinFailure="yes"
.....
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
In such a configuration, I'm building messages to be sent out to a different web service using flexible assigns:
<bpws:copy insertMissingToData="yes">
<bpws:from><![CDATA[$someIncomingRequest.mainElement/someChildElement]]></bpws:from>
<bpws:to><![CDATA[$someOutgoingRequest.mainElement/child::someChildElement]]></bpws:to>
</bpws:copy>
This works great until I activate the in-memory option in BPEL process's bpel-deploy.xml:
<process name="ns:ProcessName">
<active>true</active>
<in-memory>true</in-memory>
....
</process>
With in-memory activated, the inserted child elements no longer have the null XML namespace explicitly set (normally they should have xmlns='') and, consequently, they inherit the namespace of the main message element. The target endpoint (which is a simple JAX-WS CXF endpoint for a stateless EJB) then throws an "unmarshalling error" fault.
Example:
Correct behaviour without in-memory:
ODE outbound message:
<message>
<mainElement>
<mainElement xmlns='http://service/xml/namespace/'>
<someChildElement xmlns=''>somedata</someChildElement>
<anotherChildElement xmlns=''>moredata</anotherChildElement>
</mainElement>
</mainElement>
</message>
Incorrect behaviour with in-memory set to true (note the omission of "xmlns=''" on child elements):
ODE outbound message:
<message>
<mainElement>
<mainElement xmlns='http://service/xml/namespace/'>
<someChildElement>somedata</someChildElement>
<anotherChildElement>moredata</anotherChildElement>
</mainElement>
</mainElement>
</message>
This causes the target endpoint to throw the following fault (note that it explicitly says that it expects someChildElement and others in the empty XML namespace):
org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element
(uri:"http://service/xml/namespace/", local:"someChildElement").
Expected elements are <{}someChildElement>,<{}anotherChildElement>
Attachments
Issue Links
- blocks
-
RIFTSAW-318 Add support for "inline variable initialization"
- Closed