aspose file tools*
The moose likes Web Services and the fly likes Webservice Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice Exception" Watch "Webservice Exception" New topic
Author

Webservice Exception

Srinivas Genji
Ranch Hand

Joined: May 04, 2004
Posts: 37
Hi Everyone,
I`m getting an error when my client tries to access the service end point class (which is also an Stateless Session Bean - EJB3). My Server codes returns a DTO object, I guess this exception is due to DTO object marshalling to XML. I am using Jboss 4.2.2 AS. Here is the error given below :


Caused by: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.]
at org.jboss.ws.core.jaxws.JAXBSerializer.handleMarshallException(JAXBSerializer.java:122)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:86)
at org.jboss.ws.core.binding.SerializerSupport.serialize(SerializerSupport.java:57)
at org.jboss.ws.core.soap.ObjectContent.marshallObjectContents(ObjectContent.java:159)
at org.jboss.ws.core.soap.ObjectContent.transitionTo(ObjectContent.java:72)
at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
at org.jboss.ws.core.soap.SOAPContentElement.writeElement(SOAPContentElement.java:531)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:825)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElementContent(SOAPElementImpl.java:840)
at org.jboss.ws.core.soap.SOAPElementImpl.writeElement(SOAPElementImpl.java:825)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElementInternal(SOAPElementWriter.java:149)
at org.jboss.ws.core.soap.SOAPElementWriter.writeElement(SOAPElementWriter.java:130)
at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:291)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.sendResponse(RequestHandlerImpl.java:343)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:306)
... 22 more
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.]
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:320)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:246)
at org.jboss.ws.core.jaxws.JAXBSerializer.serialize(JAXBSerializer.java:80)
... 36 more
Caused by: javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:240)
at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:255)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:647)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:679)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:679)
at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:150)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:679)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:151)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:185)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:305)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:312)
at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:71)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:488)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:317)
... 38 more
Caused by: javax.xml.bind.JAXBException: class com.sys.nhm.dto.FormatDTO nor any of its super class is known to this context.
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:556)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:642)
... 58 more



MainDTO which is getting returned back to client has a Collection of FormatDTO. If I try to remove the FormatDTO in MainDTO to test. Then the same error points to MainDTO. Please provide some suggestions to fix this issue.

cheers
Srinivasulu Genji


Genji B Srinivas<br />M.Tech (IT) Aus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webservice Exception