Hello,

I try to use Jaxb (instead of SAXBuilder) to unmarshall an xml file
containing a ADD_ROSPEC. This is a snippet of the code :

        ADD_ROSPEC spec = null;
        JAXBContext context =
JAXBContext.newInstance(org.llrp.ltk.generated.messages.ADD_ROSPEC.class
);
        Unmarshaller unmarshaller = context.createUnmarshaller();
        unmarshaller.setEventHandler(new
javax.xml.bind.helpers.DefaultValidationEventHandler());
        spec = ((JAXBElement<ADD_ROSPEC>)
unmarshaller.unmarshal(inputStream)).getValue();
        return spec;


But, when I try to execute the code, it fails saying that there is a
problem on the interface in the generated classes of LTKJava. Examples
of error messages : 
org.llrp.ltk.generated.interfaces.AirProtocolEPCMemorySelector is an
interface, and JAXB can't handle interfaces.
org.llrp.ltk.generated.interfaces.AirProtocolEPCMemorySelector does not
have a no-arg default constructor.


To solve this problem, I think I have to add some modifications in the
javaInterfaceTemplate.vm and then generate again the LTKJava. 


Can you help me by telling me what should I add in this template (or
others ?) so I can use Jaxb on the classes defined in LTKJava ?

Thanks in advance for your help. 

 <<Picture (Metafile)>> 
Wafa SOUBRA
Orange Labs
905, rue Albert Einstein
06921 - Sophia Antipolis Cedex
[email protected]
 <<Picture (Metafile)>> 

<<ole0.bmp>>

<<ole1.bmp>>

------------------------------------------------------------------------------
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel

Reply via email to