On Thu, Jul 20, 2017 at 6:06 AM, Adrien Quentin <adri1.que...@gmail.com>
wrote:

> Hello,
>
> I'm trying to use jackson deserialization to parse and map java object.
> Work fine except when the xml contains two same local names in differents
> namespaces, like this :
>
>
> <wfs:FeatureCollection>
>
> <wfs:member>
>
> <gsmlp:BoreholeView gml:id="XXXXXX">
>
> <gml:description>Borehole description</gml:description>
>
> <gml:identifier codeSpace="http://www.ietf.org/rfc/rfc2616";>
>
> XXXXX
>
> </gml:identifier>
>
> <gsmlp:identifier>
>
> XXXXX2
>
> </gsmlp:identifier>
>
> </gsmlp:BoreholeView>
>
> </wfs:member>
>
> </wfs:FeatureCollection>
> Setup my bean (boreholeview) like this :
>
>
> @JacksonXmlElementWrapper(namespace = "gsmlp",localName = "identifier")
> String identifier;
>
> @JacksonXmlElementWrapper(namespace = "gml",localName = "identifier")
> String gmlIdentifier;
>
> jackson raised the exception below, it seems that the uniqueness is ensure
> by localname without the use of namespace, is there any parameter to solve
> this ?
>
>

Unfortunately this is a known but unsolved problem -- local names have to
be unique as is.
A related issue is at:

https://github.com/FasterXML/jackson-dataformat-xml/issues/27

About the only work-around currently would be to disable namespace handling
of underlying parser (Woodstox, or other Stax implementation),
in which case property names would need to include namespace prefix
explicitly.
But it would work.

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jackson-user+unsubscr...@googlegroups.com.
To post to this group, send email to jackson-user@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to