I'm writing a WSN producer which has a payload of xs:any for sending messages. It's expecting some class with an @XmlRootElement annotation, which my class "MyAlertMessageDefinition" does have. When it attempt to send the message, I get the following exception.
Caused by: javax.xml.bind.MarshalException
- with linked exception:
Caused by: javax.xml.bind.JAXBException: class MyAlertMessageDefinition nor any of its super class is known to this context.
I've been able to marshal/unmarshal jaxb classes without issue before, the question is, how do I make this work?
I think I can simply change the WSN wsdls/xsd to replace the xs:any with that of MyAlertMessageDefinition, then rebuild the class libraries from wsconsume, but is this the best solution?
Is there some kind of context accessor for JAXBcontext or something along the lines so that I can add the MyAlertMessageDefinition into the context?