The following blog shows how to create and deploy a SOAP 1.2 based webservice in Glassfish v2 using Netbeans6.0Download and install Netbeans 6.0 from here. Click on File->New Project
Choose Web ->WebApplication

Next provide the name of the Web application
choose the Java EE version as Java EE 5


Click on Finish

Next in the Projects tab you will see EchoTest
Right Click on EchoTest and create New WebService


Click Finish

Next we add operations to the service

Click the source tab in the center pane you will see the source code

Add the following operation to the source code (This can be done by right clicking Webservices->EchoService->AddOperation)

 * Web service operation
 @WebMethod(operationName = "echoString"
 public String echoString( @WebParam(name = "parameter") String parameter) {
     return "hello" + parameter;
Add the following annotation""   
The above is important because the default binding supported by JAXWS 2.0 is SOAP 1.1 over HTTP.


This is how the source code looks


Right Click on EchoTest project
Do Clean and Build
Do Undeploy and Deploy
You will see the service is deployed at

Next  step build a client

File -> New Project -> Web Application (Same as fig 1)

Name the project as EchoClient


Click Finish
Right click on EchoClientTest and click New Webservice Client

Specify the wsdllocation as shown

Click Finish

Next expand  EchoClientTest->WebServiceReferences->EchoService->EchoService->EchoPort->echoString


Drag echoString and drop after line <h2>

This is how the jsp will look client.jpg Next Right click and call Run the EchoClientTest This is what you see when you call http://localhost:8080/EchoClientTest/ 

Hello World!

Result = hello John Doe
Advanced Tip If you want to see the soap messages add the following line in GF/domains/domain1/confiig/domain.xml in java-config element 
Then stop the GF server and restart it Next go to http://localhost:8080/EchoClientTest/ You can see the following messages in GF/domains/domain1/logs/server.log Request 
<?xml version="1.0" ?>
<S:Envelope xmlns:S="">
    <ns2:echoString xmlns:ns2="http://test/">
      <parameter> John Doe</parameter>


<?xml version="1.0" ?>
<S:Envelope xmlns:S="">
    <ns2:echoStringResponse xmlns:ns2="http://test/">
      <return>hello John Doe</return>