You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Allan Randall <ar...@dgit.biz> on 2013/02/11 06:05:22 UTC

Splitter does not bound namespace prefix from xsi:type value.

I have an XML document that I want to split into multiple documents and
process separately.

The problem I have is that the namespace prefix in the xsi:type attribute is
not added to the DOM thus when I try to process the XML from the
managedEntities queue I get the following error;

/Execution of JMS message listener failed. Caused by:
[org.apache.camel.RuntimeCamelException -
java.lang.IllegalArgumentException: prefix prd is not bound to a namespace]/

I am currently using Camel 2.10.0

The route:


A sample message that produces the issue:


An example of the message produced onto the managedEntities queue. Note that
the prd namespace prefix is not defined.


Has anyone experienced this issue before or know how I can resolve this
issue?

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Splitter-does-not-bound-namespace-prefix-from-xsi-type-value-tp5727324.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Splitter does not bound namespace prefix from xsi:type value.

Posted by Allan Randall <ar...@dgit.biz>.
I can work around this issue by registering the namespace prefixes, used in
the xsi:type value, in the Document once I dequeue it from the
managedEntities queue.

In my example these are:


The downside to this approach is that it relies on the client using the same
prefix every time, which is not necessarily going to be the case.

I'm guessing that this is a use case that doesn't come up a lot which is why
it has not been picked up. To me it appears like a bug in the Camel
splitter. I will attempt to try it with a later version of Camel.



--
View this message in context: http://camel.465427.n5.nabble.com/Splitter-does-not-bound-namespace-prefix-from-xsi-type-value-tp5727324p5727373.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Splitter does not bound namespace prefix from xsi:type value.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can try adding your namespace declaration in the top of the XML
file, eg in the <beans> tag, instead of the <camelContext>

On Mon, Feb 11, 2013 at 6:05 AM, Allan Randall <ar...@dgit.biz> wrote:
> I have an XML document that I want to split into multiple documents and
> process separately.
>
> The problem I have is that the namespace prefix in the xsi:type attribute is
> not added to the DOM thus when I try to process the XML from the
> managedEntities queue I get the following error;
>
> /Execution of JMS message listener failed. Caused by:
> [org.apache.camel.RuntimeCamelException -
> java.lang.IllegalArgumentException: prefix prd is not bound to a namespace]/
>
> I am currently using Camel 2.10.0
>
> The route:
>
>
> A sample message that produces the issue:
>
>
> An example of the message produced onto the managedEntities queue. Note that
> the prd namespace prefix is not defined.
>
>
> Has anyone experienced this issue before or know how I can resolve this
> issue?
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Splitter-does-not-bound-namespace-prefix-from-xsi-type-value-tp5727324.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Splitter does not bound namespace prefix from xsi:type value.

Posted by Allan Randall <ar...@dgit.biz>.
Claus Ibsen-2 wrote
> Hi
> 
> What runtime do you use? eg how do you run this Camel application?

I am currently running this as a bundle in FuseESB 7.1



--
View this message in context: http://camel.465427.n5.nabble.com/Splitter-does-not-bound-namespace-prefix-from-xsi-type-value-tp5727324p5727344.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Splitter does not bound namespace prefix from xsi:type value.

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What runtime do you use? eg how do you run this Camel application?

eg if you use OSGi blueprint then those namespace prefixes may not be
bound, as that was possible fixed in a release after 2.10.0.


On Mon, Feb 11, 2013 at 6:05 AM, Allan Randall <ar...@dgit.biz> wrote:
> I have an XML document that I want to split into multiple documents and
> process separately.
>
> The problem I have is that the namespace prefix in the xsi:type attribute is
> not added to the DOM thus when I try to process the XML from the
> managedEntities queue I get the following error;
>
> /Execution of JMS message listener failed. Caused by:
> [org.apache.camel.RuntimeCamelException -
> java.lang.IllegalArgumentException: prefix prd is not bound to a namespace]/
>
> I am currently using Camel 2.10.0
>
> The route:
>
>
> A sample message that produces the issue:
>
>
> An example of the message produced onto the managedEntities queue. Note that
> the prd namespace prefix is not defined.
>
>
> Has anyone experienced this issue before or know how I can resolve this
> issue?
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Splitter-does-not-bound-namespace-prefix-from-xsi-type-value-tp5727324.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen