spyhunter99 [https://community.jboss.org/people/spyhunter99] created the 
discussion

"WSN Producer, JAXBException with xs:any"

To view the discussion, visit: https://community.jboss.org/message/719691#719691

--------------------------------------------------------------
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.
          at 
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:594)
          at 
com.sun.xml.bind.v2.runtime.property.SingleReferenceNodeProperty.serializeBody(SingleReferenceNodeProperty.java:105)

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?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/719691#719691]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to