Soap Web Service – Introduction

This article is to help us understand what is a soap web service. Through this tutorial, we will learn to create a simple hello world web service and a web service client to consume it, of course all in java.

All my beginner friends, go choose your weapon. I repeat, programmer without an IDE is zorro without a sword! I have chosen Eclipse as my IDE, there are numerous free IDE available. You may choose Eclipse or Netbeans. After choosing the IDE your next priority is to learn the IDE (Eclipse) shortcuts.

For this article to create a hello world soap webservice, I have chosen Netbeans as the IDE. Netbeans provides better out of the box support for web service development.

Soap webservice is cumbersome to work with in comparison to RESTful web services. If the soap web service development is going to happen using notepad then that is the first dumbest big mistake in the development plan.

What is a web service?

W3C defintion for a web service is, “a software system designed to support interoperable machine-to-machine interaction over a network”.

Web service is an interface for your software. We may have web user interface or a thick client (desktop) user interface for our software. Imagine web service as another similar interface. This interface is not for humans but for softwares.

Web/thick client directly serves end user as an interface to interact with the software. Web service serves as an interface to software developers. Using web service as an API, developers can build external systems that will interact with the software.

There are two major categories of web services

  1. SOAP Web Service
  2. RESTful Web Service
Ads by Google

Soap Web Service

Simple Object Access Protocol (SOAP) is a standard protocol specification for message exchange based on XML. Communication between the web service and client happens using XML messages. SOAP defines the rules for communication like what are all the tags that should be used in XML and their meaning.

RESTful Web Service

RESTful web service uses architectures that use HTTP or similar protocols by restricting the interface to use standard operations like GET, POST, PUT, DELETE for HTTP. Based on my experience RESTful is easier to develop. I know this statement will invite wrath of SOAP lovers.


One major component of a web service is Web Services Description Language (WSDL). It is an xml file that describes the web service technically in a machine readable format. That is, using this WSDL file we can understand things like,

  • Port / Endpoint – URL of the web service (using which we should access it)
  • Input message format
  • Output message format
  • Security protocol that needs to be followed (like https)
  • Which protocol the web service uses

I just want this article to be a beginning point for your web service exploration. Do not stop with this, explore more and more and you will love this service oriented architecture. Theory is too dull isn’t it? Lets move to fun part the coding.

Hello World SOAP Web Service

Download the latest Netbeans IDE. Go! I will wait… I am using NetBeans IDE 7.1 for this tutorial. You can download the complete source – SOAPHelloWorld of this article.

A Basic Web Application

File – New Project (Ctrl + Shift + n)
In ‘Categories:’ choose “Java Web”, in ‘Projects:’ choose “Web Application” and click Next.

In ‘Project Name:’ type “SOAPHelloWorld” and click Next.
By default ‘Server:’ is “GlassFish Server 3.1.1″ and ‘Java EE Version:’ is “Java EE 6 Web” and click Finish.

Now you have created a basic web application. By default NetBeans creates web.xml and a welcome page (Hello World) jsp page.

Just to ensure our basic setup is good, right click on the project name and click ‘Run’.

(If you have firewall running, it may popup to allow access – just allow access)

We should get “Hello World!” message in the browser. This is just a basic web application printing hello world. Now we want to do the same thing using a web service.

Towards Web Service

Right click on project name, select ‘New’ and then select ‘Web Service’

Type ‘Web Service Name:’ as “HelloWorld”, then type ‘Package:’ as “com.javapapers.webservice” and click Finish.

Thats it! Web service development is done! Oh my God this is too much. Is that so easy?? Till now, we have heard a lot about web services but we never thought of it to be so easy! Wait wait, before we relax..

NetBeans has created this SOAP based hello world web service. Lets understand what it has done in the background and verify if it is working.

Service Code

Following is the java code that serves as the web service and it is generated by Netbeans.

 * To change this template, choose Tools | Templates
 * and open the template in the editor.
package com.javapapers.webservice;

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

 * @author USER
@WebService(serviceName = "HelloWorld")
public class HelloWorld {

     * This is a sample web service operation
    @WebMethod(operationName = "hello")
    public String hello(@WebParam(name = "name") String txt) {
        return "Hello " + txt + " !";

hello is the operation that returns “Hello” + the parameter sent as argument.

WSDL of Web Service

Now right click the project and click run. Then type the following url in the browser


it will return the wsdl of the soap web service that we have created now. This wsdl contains,

  • xml definition
  • XSD schema import
  • Two message tags hello and helloResponse (request and response)
  • Porttype definition including operation hello
  • Binding describes, we use soap, then operation, input and output.
  • Service definition, name, port and address for invocation.

Web Service Client

Now lets invoke this webservice and see how it works.
Open the index.jsp that was generated by NetBeans

Remove the “Hello World!” string. We are going to access the now created soap web service in the place and print whatever the web service returns.

Right click on the project and choose ‘New’ then ‘Web Service Client…’

In the New Web Service Client dialog select ‘WSDL URL:’ and type the wsdl url in the text box ‘http://localhost:8080/SOAPHelloWorld/HelloWorld?wsdl’. Then in package, type com.javapapers.webserviceclient and click Finish.

Invoke the Web Service

Now the web service client is ready. We need to invoke the hello world soap web service using the web service client we have created now.

In that place right click choose “Web Service Client Resources” then select “Call Web Service Operation…”

From that dialog select “hello” and clik ok. This is the operation we are invoking of that web service.

Following is the code snippet inserted by Netbeans IDE to access the web service.

    <%     try { 	com.javapapers.webserviceclient.HelloWorld_Service service = new com.javapapers.webserviceclient.HelloWorld_Service(); 	com.javapapers.webserviceclient.HelloWorld port = service.getHelloWorldPort(); 	 // TODO initialize WS operation arguments here 	java.lang.String name = ""; 	// TODO process result here 	java.lang.String result = port.hello(name); 	out.println("Result = "+result);     } catch (Exception ex) { 	// TODO handle custom exceptions here     }     %>

In the above code snippet, for vaiable ‘name’ assign a string value you prefer like,

java.lang.String name = "javapapers";

Right click the project and select ‘run’ and you get “Result = Hello javapapers ! ”

You can download the complete source – SOAPHelloWorld of this article.

This Web Service tutorial was added on 04/03/2012.



Comments on “Soap Web Service – Introduction”

  1. hello sir,
    whenever i installed the eclipse i will give
    error “Failed to load JNI Shared Library ”

    Please tell me

    • saurabh

      Check your Eclipse is 32 or 64 bit. Download Eclipse according to Window,Linux or Mac OS (32 or 64 bit version)…

  2. kamilo cervantes

    hello there,
    i hope you make a paper about jax-ws and BPEL :D

  3. “I have chosen Eclipse as my IDE” and then you use NetBeans.

  4. shan

    HI we need same examle in eclipse IDE, Can you provide in eclipse?

  5. Anonymous


    Its really good and simple example to start with for WS beginners.


  6. ismail shepl

    really thank you so much for this cute and simple article.

    hope god help you in your life.


    dear ‘manjit kumar’,
    about your error “Failed to load JNI Shared Library ”
    just configure your eclipse.ini
    just correct the paths in it

    thank you again ENg.Joseph Kulandai


  7. Raju

    Hai, joe , first off all Thnaks for making the blog GooD manner, every one is very help full to me, please try to provide one concept every day that may be new or alredy Existing

  8. Anonymous

    it’s very good.

    How can i provide the seurity for webservices?

  9. Vinay.K

    It’s very good artical..
    please provide example on RestFull webservice….

  10. dnyaneshwar

    this is good artical to understand Web Service

  11. Hi Joe, thank you so much….nice overview on webservices….helps a lot….

  12. anbalagan

    There was a Contradiction between two of your statements in article as below

    1.web service as another similar interface. This interface is not for humans
    2.Web service serves as an interface to software developers.

    Please describe

    • Joe

      Let me clarify the interface statement. Web services are not an interface for end users, it is meant to be used by software developers. They will write another application which will connect with the web service.

  13. Rajivdh

    JavaOne 2012 is apparently being held at Hyderabad this year as well (3-4 May). They have also started accepting registrations. Check this: )

  14. Anonymous

    Hi Joe,

    I need to more about Webservices. Please write more on Webservices. Waiting for your future articles.


  15. This seems very clear. Good explanation Joe..Thank you very much.

  16. Anonymous

    please explore more. like How service is build and defining XSD with WSDL example.

    Navaz. shaik

  17. Padmanabhan


  18. Niket Patel

    would u please help me for attachment with axis1.4 ?
    i want to send a file using web-service to client when client call to service.
    i did it but i cant understand how file attached with handler.

    MessageContext msgContext = MessageContext.getCurrentContext();

    Message rspmsg = msgContext.getResponseMessage();

    DataHandler dhSource = new DataHandler(new FileDataSource(“c:\odbill.pdf”));

  19. Anonymous


    Great article.!

    can you please explain, writing web service (SOAP) without IDE too!

  20. Latha

    Can you provide me one example of complex data types for web services?
    where the service should use list of objects. Like returns array of objects.

  21. gopi

    Thanks alot Joe

  22. debashisparida parida

    sir can you help me how to use cvs tools
    in myeclipse..
    debasish on 13th 2012 6.40 pm

  23. Raghu

    I have generated the stub code using Axis2 (1.6.1) library to invoke a webservice. When i invoke a particular service, it is throwing below error

    org.apache.axis2.AxisFault: There was an exception running the extensions specified in the config file. —> Value cannot be null.
    Parameter name: input
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
    at org.apache.axis2.description.OutInAxisOperationClient.send(
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
    at org.apache.axis2.client.OperationClient.execute(

    This service works fine with Axis1 and SOAPUI tool but not with Axis2. Can anybody please help me in this?

    Thanks in advance,

  24. sivaram

    Hi joe,

    this is sivaram . i am new to webservices

    can u give me a simple example to learn the webservice in eclipse.

  25. Raghu

    Simply Superb

  26. Amar

    I am using Apche CXF 2.5 to create soap web services.can i return List of ustom object from soap web service class

    Appreciate of your kind co-operation


  27. Anonymous


    Your i have one question.
    Soap based services generate xml to communicate.
    What about Restful services..

  28. s@nk@r

    This is very useful for me….
    we need example using myeclipse

  29. Anonymous

    Thanks Joe

  30. Luther

    Hi Joe,

    When I call the webservice operation I get an exception lang.NoClassDefFoundError .
    THere is some problem with the classpath I guess , kindly help

  31. Anonymous

    I like it so much… what a gr8 stuff to learn… i really appriciate this.

  32. Jasmine

    Could you kindly explain the differences between JMS and Web Service and when the JMS and Web Service will be used?

    • Monish Sen

      JMS is message driven i.e information is exchanged in the form of messages. It is ideal for middleware

      WebServices use various medium like (xml/json/plaintext) to communicate. It is ideal for client server scenario

  33. Anonymous

    hi mr joe my apache tomcat is not creating cache

  34. vinu

    Hi Sir
    Using handlers i have intercepted my SOAP Response for attaching my hash i want to send this SOAP response to client.

  35. Anonymous

    Perfect explenation for beginers

  36. Rohan

    Excellent example Joe!It helped a lot.i also want to know how to configure web services on myeclipse or eclipse ide.that would be more beneficial.
    Thanks again!

  37. Rohan

    Excellent example Joe!It helped a lot.i also want to know how to configure web services on myeclipse or eclipse ide.that would be more beneficial.
    Thanks again!

  38. Joe, appreciate your effort
    It could have been useful if you would have explained the elements/components of WS..!!

  39. Avinash

    Thank You Joe.

    Really a good one…

  40. Anonymous

    Thanks for explain java in such a simple manner…benefited a lot from ur articles..keep up the good workk!! waiting for more..:)

  41. senthilnathan

    I can able to create webserviceclient please help me in this…

  42. senthilnathan

    Hi Jeo,

    Also i am not getting url what you said above article(i.e http://localhost:8080/SOAPHelloWorld/HelloWorld?wsdl)
    instead of i am getting this “http://localhost:8084/SAOPHelloWorld/”….so please guide me to get result

  43. Ganesh

    It is very nice and helpful.

  44. Nitin

    Simple, crip and terse articles for any Java deveLO(P)VER :-D

  45. Praveen


    Its very much understandable.

    But I need this thing in Eclipse. And I’m working with th OS Ubuntu.


  46. Gopi

    Hi joe ,

    I learned a lot from your articles. Can you please post an article regarding webservices security and restful webservices in detail.

  47. Amir Iqbal

    Joe, You rock! Thumbs up for you !

  48. karthick

    Joe You are rock! can you give some more examples?

  49. in wsdl file what is uses of minOccurs=”0″ and maxOccurs=”ünbounded” ?

  50. Anonymous

    I am fresher.
    I facing so much problem while learning SOAP.This site is really usfull for me..


  51. Anonymous

    Very Helpful information..above all a very excellent way of presenting the information.
    Keep up the good work…all the best cheers..:)

  52. Deep

    Nice article. Can you also post one for Rest WS.

  53. dhaya

    This is not seem actual SOAP webservice, pls refer the below link for actual SOAP service call using apache soap tool.


  54. Janhavee

    hey joe,
    I am a frequent reader of ur articles. Find them very helpful for understanding of various java concepts.
    Now i have to start working on webservices.
    can you please add some more articles explaining webservices in a bit more detail. It will be great help.


  55. Anonymous

    NICE tutorial

  56. srinivas

    Can you please suggest any books on the webservices. I am novice to Webservices. Want to know more about it.

  57. Anonymous

    Nice, could you please use Eclipse for the same article

  58. Anonymous

    Nice, could you please use Eclipse for the same article

  59. JARV

    Excelent tutorial!!!!!man congratulations!!!! I like it!! (Y)

  60. Azahrudhin

    Hi guys can you share the example for the soap webservice producer and client with cxf please.
    producer will expose method exec(Map params);
    client will access the webservice using wsdl say
    soapWsClient = new SoapClient(“url of wsdl”);

  61. Anonymous

    Frankly speaking the zip you attached is very complicated to understand, although you tried to explain it very well, but you should have to provide the explanations going through with the files that are generated in the background, there are 100′s of lines in the code that you provided in the zip file but you did not taken anything like that in the consideration while writing the blog….

  62. Santhosh Kuamr


    Could you please tell me what component contains SOA and what is JAX-WS and RPC and how to use in soa project. I could not understand those thinks.

  63. Akhil


    Very nice article.Thanks for sharing and please keep posting.

  64. vibin

    Very Good Explanation and easy to Understand..Thankuu Joe..All d best..:)

  65. Bikash

    Simple Explanation but I having some problem while creating Web Services Client. It says
    Problem with downloading wsdl or schema file.
    Check the URL, proxy setting or whether the server is running

  66. Rameshwar

    Thanks a lot..
    very helpful article.. simple and easy to understand..
    Nice blog..

  67. Dharmraj Verma

    very nice approach to execute a simple web services app.

  68. Teena


    Please publish an article on a working example of EJB as a Webservice.

  69. Vikram Bishnoi

    Awesome !!!!!!

    Run at one shot. Thanks.

  70. Ashish

    Sir,could you provide the wsdl service in eclipse IDE

  71. Anonymous

    Simple and superb example to understand basic knowledge for WS.


  72. Anonymous


    Don’t we need to publish the end point of the webservice ?


  73. suresh

    HI we need same example in eclipse IDE, Can you please provide in eclipse tooo?

    Any one can provide same example in Eclipse too….

  74. prakash

    Sir I created WebService but after creation i run the project… and type the url http://localhost:8080/SOAPHelloWorld/HelloWorld?wsdl.. it is showing 404 error.. what can i do. please explain

  75. venkat

    It is good article..

  76. hema

    its is really good artical .. i am going to start..

  77. hema

    hey i tried many times with eclipse but unable to create .
    can you provide other document for eclipse also.

  78. Prasad

    Hi Joe,

    Thanks for giving this blog.This is very helpful for me.

  79. Sony

    It’s a nice paper to get understanding of what is webservices and purpose.
    Thanks alot Joe.

  80. Anonymous

    hi Joe,

    Can you tell the steps to create RestFull web service?

  81. Shweta

    Can you please sugget somthing on this?

    Facing one issue in consuming a webservice using CXF client. I had made a class to consume web service in which there is a line:
    Client cli = ClientProxy.getClient(port); Here Client is of type org.apache.cxf.endpoint.Client;
    ClientProxy is of type org.apache.cxf.frontend.ClientProxy;
    And port is coming of type
    org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler@685d685d but port must be of type org.apache.cxf.jaxws.JaxWsClientProxy@114d114d. Don’t know why this mismatch is coming?Even axis2 jar is not there .

    For all this I am using RAD with wepshere as server

  82. Atiq@

    Hey…Can u please write a article of process to develop a simple webservice using java source code 1.4…Thanks in advance…

  83. uttam

    will you plase share a book name to study web services using apache axis4 for begginers.

    • Joe

      “Java Web Services: Up and Running by Martin Kalin” is a nice book for java web services in general. For learning Axis, go by their documentation.

  84. Jaimal Singh

    Good work keep it up…

  85. swapnil

    Joe is really genious…Thank u very much…
    you are real guid to educate programmer…

  86. Anonymous

    can the admin say d actual input and the output that we should get

  87. Anonymous

    where the flow starts and ends?

  88. Ghufran

    Great tutorial…keep it up sir

  89. Kishore

    Superb explanation :) thank you so much

  90. sravs

    Thank you so much Joe

  91. Srinivas

    Good Article. Explained nicely the simple example. can you suggest any online books for SOAP in JAVA for free

  92. mark

    Hi Joe, Since we people are moving towards RESTful Web services as current trend Can You explain the same process in REST Web service

  93. Lakshmi

    Excellent Joe, thanks for the wonderful article on web services.

  94. DS

    I downloaded latest NetBeans IDE version 7.2.1.
    I started following step 1 and got stuck? Please help. I do not see ‘Java Web’ as an option under categories? Am I missing something?

  95. DS

    Never mind guys, found the issue. Downloaded and installed the two plugins SOAP web services and RESTful web services to make it show up.

  96. DS

    U are a great, thanks for your commitment and time for keeping us all up to date on various topics. You Rock!!!

  97. senthil kumat


    I have used Netbeans IDE But after this step
    (click choose “Web Service Client Resources” then select “Call Web Service Operation…”)i got the dialog with There is no WS references

  98. senthil kumat

    I have used Netbeans IDE But after this step
    (click choose “Web Service Client Resources” then select “Call Web Service Operation…”)i got the dialog with There is no WS references

  99. Ni

    hi Joe,

    Do we need to parse SOAP-XML @ server side for geting data.


  100. Nitin Shende

    hi Joe,

    Do we need to parse SOAP-XML @ server side for geting data. Please reply


  101. raj

    This is really good. I have not yet read entire article, but just wanted to appreciate here after reading these below lines. ” Web service is an interface for your software. We may have web user interface or a thick client (desktop) user interface for our software. Imagine web service as another similar interface. This interface is not for humans but for softwares.

    Web/thick client directly serves end user as an interface to interact with the software. Web service serves as an interface to software developers.”

    Very nice and simple explanation

  102. Prashant Gupta

    The above example revised by web-services concepts.
    Perfect explanation for beginners.

    Can you please provide the example on RestFull webservice in eclipse?

    Thanks in Advance.

  103. Sathya

    I tried deploying in Tomcat 6.0.16 from netbeans 6.1 IDE, it’s not working. I’m getting the error as Throwable occurred: java.lang.IndexOutOfBoundsException

    Please clarify.

  104. Hi,
    nice artical keep it up.

  105. Bao

    Nice tutorial, thanks a lot

  106. I have to access a java swing application which is on server machine from a java web application
    Please help me.
    I have to send few attributes tu Gui apps and in turn retrieve result from that..

  107. It was helpful for my Hello World :),Excellent

  108. vinod

    Really Super Jeo, it is working for me.. thanks a lot

  109. Samuel

    good one to start with. Keep giving more

  110. VNP

    all your tutorials r really good nd easy to learn,,,,,

  111. Anonymous

    Hi joe ,

    your explanation is awesome. I would request you could you please add the hibernate tutorial also ?

    thanks ,


  112. N P Nagendra Rao

    Excellent Joe . I could be able to create Webservice and run it atlast. Thank You.

  113. Bittu

    sir do we need to install apache for this.

  114. Durga

    its really very good work out with simple example


  115. Prakash

    First thanks for this great article..
    When I tried this I have found some problem..
    I have followed your steps and developed SOAPHelloWorld Web Application.But when I tried to create web service it shows following error…
    FAIL – Deployed application at context path /SOAPHelloWorld but context failed to start
    E:\Project\Web Application\SOAPHelloWorld\nbproject\build-impl.xml:724:
    The module has not been deployed.
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(
    at org.netbeans.modules.j2ee.ant.Deploy.execute(

    Tomcat 7.0
    IDE:Netbeans 7.0

    • Launch the task manager and end the java.exe processes you have there. Then try to restart netbeans. If this does not work, you may try to recreate your application and run your application after every step.

  116. Bhushan


    Which is best web service & using by company in real project ?



  118. Anonymous

    thank you boss

  119. Sakthilakshmi

    Thank you so much. Really its a great explanation

  120. bala

    the steps given are very clear.Plz give me the steps to invoke a webservice from another webservice

  121. antesh

    after creating web services and run, got error
    HTTP Status 404 -
    type Status report
    descriptionThe requested resource () is not available.
    GlassFish Server Open Source Edition 3.1.2

  122. Jyo


    I have few issues while trying to connect to SOAP WSDL through client using security protocol .It gives a data element error thought the data element is in live with the schema and the validation is ok when checked through SOAP UI.
    pls suggest.


  123. asif

    its superb.
    pls let me know how can we do by using eclipse

  124. Shiv

    Hi Joe,

    Could you share REST based web application for saving a record into MySQL Database.


  125. Jinesh


    You write web service and then called and you got reponse.

    You did not put any Xml in the method along with the other code.When should we use xml and why in the webservices.Can u please reply

  126. I am not able to install the weblogic server in my computer can you help me out with this??

  127. Durgaprasad Perumalla

    Hi Sir,
    the basic idea about webservice is good, but plz extend the tutorial with more ….
    Thank you very much
    Durgaprasad Perumalla

  128. chandu

    please any one can help me to write remote client to invoke JWS web service in eclipse.

  129. Alex Dan Dodu

    Thank you Joe for soap-web-service-introduction. It helped me a lot!. Thank you very much. Good luck.

  130. xubing

    this is what I need, thanks a lot!

  131. lnc

    simply superb…nice article

  132. sand

    Really good tutorial, Thank you.

  133. sugu

    i have error while running this webservice which i downloaded from your website….

  134. paragflume

    Hi Joe,

    Can you please upload an example of complex data type. Like to to send and receive a Person object. Person object will contain name, address properties etc. How to use the tag in this case. Can you please send me a sample source code project for the complex data type


  135. Swati

    Its really very nice example. Thank you very much sir. Please keep on posting some nice easy examples so that anybody can learn JAVA and other J2EE concepts.

    Thank you so much…

  136. Atmprakash SHarma

    i, joe , first off all Thnaks for making the blog .can you please mpre emphasize on wsdl and background technology used in Soap. I am using JDEV.

    I ,Like al you blogs..sipmle easy, intractive…each and every night whwver i am going to sleep.i used to check this.nice.

  137. Harish Kumar Tarala

    Can you explain the concepts in multiple pages by giving next button. I couldn’t find one next page button in your articles.

  138. Swati

    Hi Joe,

    Do you know how i can point my web-service to the jdk 1.6 inherent saaj implementation ?

    My web-service runs fine under tomcat but creates a conflict when deployed in a different server that’s using jdk 1.6

    How can i make my web service to run using the soap implmenetation provided by jdk1.6 rather then using the saaj-impl.jar file under WEB-INF/lib folder ?

  139. Renu

    Really useful…thankz

  140. Monish Sen

    Nice and informative post. However I must say, usually the question REST vs SOAP is typically seeking comparison between the two different ways of writing ‘WebServices’, not a literal comparison of the concepts themselves. As you yourself said, they are entirely different things

  141. Mudassir

    any one can help me in web service authentication using eclipse, step by step tutorial. I have searched many times but didn’t find the exact tutorial.

  142. karthi

    Hi Joe, I tried your example and i added my own methods with the default hello method and from the JSP page I am passing String values to those methods. I am facing a problem here, when I passed a value for the default hello method it prints the value in the browser but for the method I defined it is not printing it in the browser and I tried SYSTEM.OUT.PRINTLN inside the method and it prints it in the console. I am unable to figure out where the problem is. Please help me out.

    And For Your Information this is the first webservice code I am writing. Thanks in advance

  143. Karthi

    Hi I am trying to consume a webservice and I created a client to consume it. I have a problem here. When I try to call the method from the client with parameter, the parameter they are used of the type user defined class. But the input I have to give is a String. How can I convert it to the user defined class type..Please help

  144. Shankar

    Its nice example sir but can please provide example for top down approch

  145. Very nice example, never will be found anywhere like this one….

  146. srijini

    i need your immediately help .
    i developed a web service in netbeans using TOMCAT as server. but i couldnt test this service (the Test Webservice and Refresh options are disabled). i searched google for the solution but didnt find . please give the sln. its urgent.


  147. Srikanta Mukherjee

    When i try to Create Webserice cilent its showing following error:
    File not found in the specified address : http://localhost:8080/SOAPHelloWorld/HelloWorld?wsdl

    Plz me help me out of this

  148. pranav

    How do we create SOAP Web Services – bottom up approach in java using eclipse and weblogic server. Request your assistance as soon as possible.

  149. Yuvraj


    Superb,simple and understandable example that i have ever seen… thanks a lot… please keep go with these kinds…

  150. abhinav

    hi im unable to load the wsdl file. And when im trying to add a webserverclient it was like problem with downloading wsdl file or schema file..can u help me

  151. Govindh

    Hi ,
    I have created HelloWorld Webservice and its working fine. How to add security that Wsdl. I want to add SSL and Username/ Token for this wsdl. How to add SSL Secutity?


  152. when apply above example i have faces the MetroIssue related toglassfish server

  153. Anonymous

    Hi, hope you’re fine.
    What about if I want to response with a xml instead of a string?

    Thanks in advance!

  154. Akanksha


    I created the web service using the steps mentioned above.
    But I am getting the following error when I am trying to fetch the wsdl.
    Please help!

    • Akanksha

      This is the error:

      HTTP Status 404 –


      type Status report


      descriptionThe requested resource () is not available.


      GlassFish Server Open Source Edition 3.0.1

  155. Naren

    Can you provide me a SOAP based Web service using database in java

Your Comment