ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tammo van Lessen <tvanles...@gmail.com>
Subject Re: XML namespaces
Date Tue, 01 Feb 2011 13:50:33 GMT
Hi Karolis,

sorry for the belated reply. What you describe is a indeed a bug. From
your text I don't understand what your approach exactly is, what about
opening a JIRA and attaching your patch so that we can review it?
Patches and contributions always welcome :)

Thanks,
  Tammo

On Wed, Jan 5, 2011 at 23:09, Karolis Petrauskas <k.petrauskas@gmail.com> wrote:
> 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
>



-- 
Tammo van Lessen - http://www.taval.de

Mime
View raw message