You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Kamran Shah <ka...@mythsoftware.com> on 2009/12/11 04:17:25 UTC

JAX-WS, Axis2 1.5.1, and javax.xml.bind.UnmarshalException

Hi guys, I am new to this mailing list although I have been using Axis for
many years now. Recently I have been working on a project trying to
implement a JAX-WS style web service.  I have banged my head on it for a
couple days now and am out of ideas.  I think that somehow the classes I
need are not being loaded properly or something.  Or maybe there is a
namespace problem?  Anyway, before I go on, here is the actual exception:

 

Caused by: javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://my.own.domain/", local:"getDACList"). Expected elements are
(none)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(Un
marshallingContext.java:609)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:239)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement
(Loader.java:116)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoa
der.childElement(UnmarshallingContext.java:1015)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(
UnmarshallingContext.java:452)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(U
nmarshallingContext.java:433)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDeco
rator.java:107)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElem
ent(StAXStreamConnector.java:275)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStre
amConnector.java:209)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmarsh
allerImpl.java:358)

        ... 35 more

Caused by: javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://my.own.domain/", local:"getDACList"). Expected elements are
(none)

        ... 46 more

 

 

Funny thing is, this was originally happening the first time but then would
work on subsequent tries.  Then after a reboot it died completely and now
always gives me this error.

 

I have @RequestWrapper and @ResponseWrapper annotations on my web method and
the wrapper classes exist and are stored in a jar file.  I am still getting
this error.  Anyone have any ideas?

 

 

--Kamran

 


RE: JAX-WS, Axis2 1.5.1, and javax.xml.bind.UnmarshalException

Posted by Kamran Shah <ka...@mythsoftware.com>.
Incidentally,  here is a code snippet defining my method:

 

WebResult(targetNamespace = "")

    @RequestWrapper(localName = "getDACList", targetNamespace =
"http://my.own.domain/", className = "domain.own.my.GetDACList")

    @ResponseWrapper(localName = "getDACListResponse", targetNamespace =
"http://my.own.domain/", className = "domain.own.my.GetDACListResponse")

    public List<DataAssetCatalog> getDACList() {

        return serviceHandler.getDACList();

    }

 

I am deploying this into Tomcat 6.0.18..  Thanks for the help.

 

--Kamran

 

From: Kamran Shah [mailto:kamran@mythsoftware.com] 
Sent: Thursday, December 10, 2009 10:17 PM
To: axis-user@ws.apache.org
Subject: JAX-WS, Axis2 1.5.1, and javax.xml.bind.UnmarshalException

 

Hi guys, I am new to this mailing list although I have been using Axis for
many years now. Recently I have been working on a project trying to
implement a JAX-WS style web service.  I have banged my head on it for a
couple days now and am out of ideas.  I think that somehow the classes I
need are not being loaded properly or something.  Or maybe there is a
namespace problem?  Anyway, before I go on, here is the actual exception:

 

Caused by: javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://my.own.domain/", local:"getDACList"). Expected elements are
(none)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(Un
marshallingContext.java:609)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:239)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement
(Loader.java:116)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoa
der.childElement(UnmarshallingContext.java:1015)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(
UnmarshallingContext.java:452)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(U
nmarshallingContext.java:433)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDeco
rator.java:107)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElem
ent(StAXStreamConnector.java:275)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStre
amConnector.java:209)

        at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmarsh
allerImpl.java:358)

        ... 35 more

Caused by: javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://my.own.domain/", local:"getDACList"). Expected elements are
(none)

        ... 46 more

 

 

Funny thing is, this was originally happening the first time but then would
work on subsequent tries.  Then after a reboot it died completely and now
always gives me this error.

 

I have @RequestWrapper and @ResponseWrapper annotations on my web method and
the wrapper classes exist and are stored in a jar file.  I am still getting
this error.  Anyone have any ideas?

 

 

--Kamran

 

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.426 / Virus Database: 270.14.102/2556 - Release Date: 12/10/09
07:36:00