Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4333260
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:22:08+00:00 2026-05-21T10:22:08+00:00

I am creating a simple SOAP web service using a SLSB and JAX-WS annotations.

  • 0

I am creating a simple SOAP web service using a SLSB and JAX-WS
annotations. The objects I would like to pass are JAXB generated from OGC schemas, thanks for the OGC project at java.net. 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?

My app server/environment is GF 3.1.

Thanks for the help!

Steve

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:22:09+00:00Added an answer on May 21, 2026 at 10:22 am

    I got it working with @UsesJAXBContext – had a little trouble at first because NB 6.9 and 7.0b wanted to link the com.sun.internal.* versions of the UsesJAXBContext and related, which of course isn’t what JAX-WS RI is looking for. Once I fixed these, and added the dependency to jaxws-rt, version 2.2.3, everything worked great.

    @WebService(serviceName = "SOS")//, targetNamespace = "http://www.opengis.net/sos/1.0")
    @UsesJAXBContext(value = SosServices.SosJaxbContext.class)
    //@XmlSeeAlso({net.opengis.sos.v_1_0_0.filter.v_1_1_0.ObjectFactory.class, net.opengis.sensorml.v_1_0_1.ObjectFactory.class})
    public class SosServices {
    
    @WebMethod(operationName = "GetResult")
        public GetResultResponse getResult(GetResult request) {
            throw new UnsupportedOperationException();
        }
    
    public static class SosJaxbContext implements JAXBContextFactory {
    
            @Override
            public JAXBRIContext createJAXBContext(SEIModel sei,
                    List<Class> classesToBind, List<TypeReference> typeReferences)
                    throws JAXBException {
    
                List<Class> classList = new ArrayList<Class>();
                classList.addAll(classesToBind);
                classList.add(TemporalOpsType.class);
    
                List<TypeReference> refList = new ArrayList<TypeReference>();
                refList.addAll(typeReferences);
                refList.add(new TypeReference(new QName("http://www.opengis.net/ogc", "temporalOps"), TemporalOpsType.class));
    
                return JAXBRIContext.newInstance(classList.toArray(new Class[classList.size()]),
                        refList, null, sei.getTargetNamespace(), false, null);
            }
        }
    }
    

    Thanks to Aleksei Valikov on the ogc (java.net project) mailing list to the pointer to @UsesJAXBContext!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using NetBeans's Web Service generation tools. I've looked at the tutorials available, but
i am creating simple dashboard view in which i using createDashboardItem function item has
Background: I'm trying to write a simple SoapExtension class to log inbound/outbound Soap messages
Simple problem, actually. I am trying to evaluate the possibilities of Google Apps, using
We have multiple versions of our web services (both REST and SOAP) in production,
I thought of creating simple IDE with the help of Groovy language, and i
I am creating a webservice that essentially remotes some database calls (so that they
I will be building a system where a particular object will originate from a
I need to add some random html content with text before and after my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.