users@jax-ws.java.net

Specify jaxb packages for web service?

From: <smsiebe_at_gmail.com>
Date: Tue, 12 Apr 2011 12:47:08 +0000 (GMT)

Hello,

This is a cross post from the metro mailing list...perhaps this is a
more appropriate forum?

I am creating a simple SOAP web service using a SLSB and JAX-WS
annotations. One particular method I am having trouble with (which
causes the deployment to fail) is a situation where a field (eventTime)
 of the request object (GetResult) is in a different package than the
request object. The ObjectFactory for this type is different and there
is a problem when marshalling/unmarshalling.

A subset of the errors I'm getting:

There's no ObjectFactory with an @XmlElementDecl for the element
{http://www.opengis.net/ogc}temporalOps.
       this problem is related to the following location:
               at protected javax.xml.bind.JAXBElement
net.opengis.sos.v_1_0_0.GetResult$EventTime.temporalOps
               at net.opengis.sos.v_1_0_0.GetResult$EventTime
               at protected java.util.List
net.opengis.sos.v_1_0_0.GetResult.eventTime
               at net.opengis.sos.v_1_0_0.GetResult
               at public net.opengis.sos.v_1_0_0.GetResult
net.opengis.sos.v_1_0_0.ObjectFactory.createGetResult()
               at net.opengis.sos.v_1_0_0.ObjectFactory

In a standard SE application, when I initialize the JAXBContext like
below, everything works well.

       JAXBContext context =
JAXBContext.newInstance("net.opengis.sos.v_1_0_0:net.opengis.sensorml.v
_1_0_1:net.opengis.sos.v_1_0_0.filter.v_1_1_0");


How do I set the JAXB packages in the JAX-WS context?

Thanks,

S