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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:07:28+00:00 2026-06-12T20:07:28+00:00

We have a message processing server, which start a few threads processing the message

  • 0

We have a message processing server, which

  • start a few threads
  • processing the message
  • interact with the database etc…..

now the client want to have a web service server on the server, they will be able to querying the message processing server, with a web service client. e.g. give me all the messages for today, or delete the message with id….

the problem are:

  • The server just a standard j2se application, doesn’t run inside application server, like tomcat or glassfish.
  • To handle a Http request, do I need to implement a http server?
  • I would like to use the nice j2ee annotation such as @webservice, @webmothod etc…
    is there any library or framework I can use
  • 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-12T20:07:29+00:00Added an answer on June 12, 2026 at 8:07 pm

    You don’t need a third party library to use jax-ws annotations. J2SE ships with jax-ws, so all the annotations are still available to you. You can achieve lightweight results with the following solution, but for anything optimized/multi-threaded, it’s on your own head to implement:

    1. Design a SEI, service endpoint interface, which is basically a java interface with web-service annotations. This is not mandatory, it’s just a point of good design from basic OOP.

      import javax.jws.WebService;
      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.soap.SOAPBinding;
      import javax.jws.soap.SOAPBinding.Style;
      
      @WebService
      @SOAPBinding(style = Style.RPC) //this annotation stipulates the style of your ws, document or rpc based. rpc is more straightforward and simpler. And old.
      public interface MyService{
      @WebMethod String getString();
      
      }
      
    2. Implement the SEI in a java class called a SIB service implementation bean.

      @WebService(endpointInterface = "com.yours.wsinterface") //this binds the SEI to the SIB
      public class MyServiceImpl implements MyService {
      public String getResult() { return "result"; }
       }
      
    3. Expose the service using an Endpoint
      import javax.xml.ws.Endpoint;

      public class MyServiceEndpoint{
      
      public static void main(String[] params){
        Endpoint endPoint =  EndPoint.create(new MyServiceImpl());
        endPoint.publish("http://localhost:9001/myService"); //supply your desired url to the publish method to actually expose the service.
         }
      }
      

    The snippets above, like I said, are pretty basic, and will perform poorly in production. You’ll need to work out a threading model for requests. The endpoint API accepts an instance of Executor to support concurrent requests. Threading’s not really my thing, so I’m unable to give you pointers.

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

Sidebar

Related Questions

I have a simple server-client model. In which Server sends some encrypted message to
I have a web service , i add some extra class which have message
I have a C# console application, which interacts with a SQL Server Database, and
we have WebSphere MQ server. I have written Java client utility which can read
i have a client-server application which uses .NET Remoting communication. For authentication reasons i
We have built a web application that accepts SOAP messages, does some processing, calls
I have a message handler, which consumes from a JMS queue and that sends
I have a message that I want to fadeIn when a form is successfully
I need to write a server which accepts connections from multiple client machines, maintains
I have the following code which works fine. However, I only want to return

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.