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 8236425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:07:49+00:00 2026-06-07T19:07:49+00:00

I am trying to add a JAX-WS web service to my Embedded Jetty application.

  • 0

I am trying to add a JAX-WS web service to my Embedded Jetty application. The web service client will be a .NET application.

My project was created as a Maven application in Netbeans 7.1.1. It uses Spring 3.0.

I took the following steps to add the JAX-WS to my application:

  1. Added jaxws-spring to the pom.xml.

    <dependency>
        <groupId>org.jvnet.jax-ws-commons.spring</groupId>
        <artifactId>jaxws-spring</artifactId>
        <version>1.8</version>
        <exclusions>
            <exclusion>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    
  2. In my Spring web services context, configure the WSSpringServlet.

    webservicesContext.addServlet(new ServletHolder(new WSSpringServlet()), "/service/*");
    
  3. Created an implementation class for my service.

    @WebService(name = "GenerateUEIDService")
    public class GenerateUEIDService {
    
        @WebMethod(operationName = "generateUniqueIds")
        public String generateUniqueIds() {
            return "Hello World";
        }
    
    }
    
  4. Configure my service in the Spring applicationContext.xml file.

    <bean id="generateUEIDService" class="com.mycompany.GenerateUEIDService"/>
    
    <wss:binding url="/service/GenerateUEID.svc">
     <wss:service>
      <ws:service bean="#generateUEIDService" />
     </wss:service>
    </wss:binding>  
    

I didn’t use any Web Service creation wizard in Netbeans for Step 3 above. Instead I created GenerateUEIDService as a normal Java class, but adding the annotations. Even though I didn’t Netbeans did somehow detect this was a Web Service because it created a “Web Services” node in the project view with “GenerateUEIDServiceService” beneath it. If I expand GenerateUEIDServiceService I see “generateUniqueIds: String”.

It seems to build fine. But when I run the application I get:

com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class
com.mycompany.jaxws.GenerateUniqueIds is not found. Have you run APT to generate them?

Well no, I haven’t run APT to generate anything. Given my configuration how should I do that? Do I need to add a plug-in to my pom.xml? Or was Netbeans magically supposed to generate the wrapper for me?

Please note that my web service client will be .NET. So I assume I should use the default SOAPBinding of document/literal wrapped.

  • 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-06-07T19:07:51+00:00Added an answer on June 7, 2026 at 7:07 pm

    I decided to create a simple Netbeans Maven java application to see if the wrapper classes for the service would be generated automatically. Turns out they are created dynamically at run-time by the JAX-WS runtime.

    [exec:exec]
    Jul 12, 2012 8:30:05 AM com.sun.xml.internal.ws.model.RuntimeModeler getRequestWrapperClass
    INFO: Dynamically creating request wrapper Class com.mycompany.mavenjaxwsjetty.jaxws.Greet
    Jul 12, 2012 8:30:05 AM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass
    INFO: Dynamically creating response wrapper bean Class com.mycompany.mavenjaxwsjetty.jaxws.GreetResponse
    

    So back to my original application (from the original posting above). I removed the jaxws-spring stuff for unrelated reasons. I may have made some other changes I can’t recall. And now when I run that application I can see in the logs that the wrapper classes are being created.

    So I guess the answer to my question is that Netbeans does not magically create the wrapper classes for me, but rather the jax-ws runtime does.

    Still I wonder under what circumstances the wrapper classes wouldn’t be generated automatically for me. Or when I would want to generate my own using wsgen or maven-jaxb2-plugin. As usual, I guess there are more than one ways to “skin the cat” and each has its pros and cons.

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

Sidebar

Related Questions

I'm trying to add a custom callback handler to a client web service (JAX-WS),
I'm trying to develop a standalone Java web service client with JAX-WS (Metro) that
I am trying to consume the Exchange 2010 Web Service interface using JAX-WS. I'm
So I have been trying to create a new RESTfull web application project in
Im new to asp.net mvc. I'm trying add new model class but it got
I am attempting to add BASIC authentication to my RESTful web-service. Currently I have
Trying to add a functionality to our JSF 2 application to list active users
I'm working on a web service written in Java using JAX-RS/Jersey and Spring. The
I'm trying add a tab to my web page that looks like this: Using
I'm trying add some implicit rules in CMake that will generate direct dependencies (like

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.