This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See web services, I need to make a sample prototype web service using jdk1.6 on JBoss server.
I want to create simple web service that will show "Hello World"
for last three days I'm struggle to make a simple web service
Please help me, while searching on google I found some useful links as:

I tried but could not understand properly in the link[/B]]

I found code as


public class NumberAdderUpperer {

public int addEmUp(int number1, int number2) {
return number1 + number2;


OK, so now you'd hit deploy in your IDE of course and stick it on the corporate app server, tell the world, and be done. But for the slightly more cautious amongst you, let's you and I do it with nothing more than the Mustang SDK, which has its own mini-Http server just for things like this:-

Endpoint.publish("http://localhost:8080/ws-tmi/adderupperer", new NumberAdderUpperer ());

Oops ! And now your new number adding service is published at: "http://<hostname>:8080/ws-tmi/adderupperer".

I don't know how can I use this code in my sample web service.
Please help me.

Thanks & Regards,
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Developing a webservice on JDK1.6 is very easy.

1) Just write an normal java class,method, on top of the method use the annotation @webservice.

2) compile and deploy it in the server

3) Now it would have created a stubs for your service.
4) import the services as the library
5) call the method as you call from usual class

for ref you can contact me at or Ref links :-

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!