Hi all,
I'm using Apache ODE in my project to run processes. Inheritance
of complex types is heavily used in the XML schemes of the web
services. As a consequence, xsi:type attributes are used in the
messages extensively. Here I faced some problems. It seems ODE tries
to remove XML declarations of namespaces, that are not used in the
document. This optimization unfortunately does not take xsi:type
attributes into consideration. As a consequence, message like this
(pseudo code):
<message xmlns="messageNS">
<order xsi:type="o:MyOrder" xmlns:o="orderNS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</message>
converts to something like this (pseudocode again):
<message xmlns="messageNS">
<order xsi:type="o:MyOrder"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</message>
i.e. xmlns:o="orderNS" is removed, as the prefix "o" is not referenced
anywhere except the contents of the xsi:type attribute. Resulting
document is not valid anymore if complex type "MyOrder" was derived
from an abstract complex type.
I have fixed this behavior and it works at least for my process.
The side effect is that a lot of unneeded namespace declarations are
now passed around. In my case it is better than corrupted messages. I
want to contribute my patch to ODE, but I'm not shore, if my approach
is OK and would like to get your opinion about this issue.
Looking forward for your comments,
Karolis Petrauskas