On Feb 19, 2013, at 5:41 PM, Carlos Garces <[email protected]> wrote: > I have several WSDL with complex types using xsd:any elements > > In the input and output objects generated with wdsl2java this elements > are converted to List<Object> > > I think that I should use org.w3c.dom.Element to handle it but I'm not > sure about the implementation. > > Any one have a sample about how work with xsd:any elements and > org.w3c.dom.Element?
The reason it maps to List<Object> instead of List<Element> is that if the element in the incoming message is a "known" root element, JAXB will deserialize it to the actual JAXB type and add that. You can create an JAXB binding.xml file that forces the mapping to DOM. If you check section 7.12 of the JAXB spec, it explains how to use the <jaxb:dom> declaration in the binding file to force a mapping to DOM. Not 100% sure it works on the any, but it might be worth a shot. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
