JAX-WS 2.0 Web Service Client

Author: Jaroslav Pospisil
Version: 1.4
Last update: 13.3.2007
Introduction:

This test specification should test Web service client creation in J2SE and J2EE project. The specification covers developing of simple web service client in NetBeans 5.5.1 on Tomcat(specifically Bundled Tomcat 5.5.17), SJAS 8.2 and SJAS 9(Glassfish) v2.
Comment:

This test specification is based on End - to - end scenarios, written by Lukas Jungmann.




Table of Contents






Test suite 1: Web Service Client in J2SE project

Purpose: Functionality of J2SE WS Client.
Setup: First make sure SJAS 9(Glassfish) is installed and add it in Runtime tab.
Create new Web Service of name MyWS.Invoke wizard File|New Project|Web|Web Application or File|New Project|Enterprise|EJB Module and then
File|Web Services|Web Service. Add operation to new web service - open Web Services node and right-click on service to invoke Context menu, select Add Operation
action and click OK in next dialog. In editor change return value of the operation to return "Hello".
Create new Java Application - go to File|New Project|General|Java Application.
Specify Hello as Project Name.
Specify project's directory.
Specify org.netbeans.hello.Main as project main class.
Click Finish.

#Test caseDescription
1Create web service client
1. Go to File|New File|Web services|Web Service Client|Next.
2. Specify WSDL - there are now three ways to do it. First copy URL from clipboard as Running Web Service WSDL URL,then you could specify project,where is web
service located.Third way is to specify wsdl file on hard disc.Try all three ways to test ws client.
3. Optional: if you're behind proxy check its settings via Proxy settings... button.
4. Specify package for the client, eg. org.netbeans.hello.client.
5. Click Retrieve WSDL.
6. Click Finish.
RESULT: In Projects tab|Hello open Web Service References node.Click on it and there should be reference to MyWS web service. .
2Refresh WSDL
1. Go to Projects tab|Hello|Web Service References|MyWS.
2. Right-click on web service and then select "Refresh WSDL"
RESULT: WSDL of web service in client will be updated .
3Edit Web Service Attributes
1. Go to Projects tab|Hello|Web Service References|MyWS.
2. Right-click on web service and then select "Edit Web Service Attributes"
RESULT: WSDL Customization table will open and you could change ws attributes like ports or bindings .
4Configure Handlers
1. Go to Projects tab|Hello|Web Service References|MyWS.
2. Right-click on web service and then select "Configure Handlers"
RESULT: Configure Handlers dialog window of web service will open.
5Delete web service client
1. Projects tab|Hello|Web Service References|MyWS node.
2. Right-click on web service and then select "Delete" and twice "Yes" in next windows.
RESULT: Web service (and Web Service references node,if the service was last one) should disappear from Projects tab .
Teardown:




Test suite 2: Web Service Client in J2EE module

Purpose: Functionality of J2EE WS Client.
Setup: First make sure SJAS 8.2 and SJAS 9(Glassfish v2) is installed and add it in Runtime tab.
Create new Web Service of name MyWS.Invoke wizard File|New Project|Web|Web Application or File|New Project|Enterprise|EJB Module and then
File|Web Services|Web Service.Add operation to new web service - open Web Services node and right-click on service to invoke Context menu, select "Add Operation"
action and click "OK" in next dialog.In editor change return value of the operation to return "Hello".
Create new Web module - go to File|New Project|Web|Web Application, new EJB module - go to File|New Project|Enterprise|EJB Module and
new application client - go to File|New Project|Enterprise|Application Client. Select SJAS 9(Glassfish) server as target server.
J2EE version should be set to JavaEE5 . Click Finish.
Web service client could be created only in there three modules, so test next test cases for each of them.

#Test caseDescription
1Create web service client
1. Go to File|New File|Web services|Web Service Client|Next.
2. Specify WSDL - there are now three ways to do it. First copy URL from clipboard as Running Web Service WSDL URL,then you could specify project,where is web
service located.Third way is to specify wsdl file on hard disc.Try all three ways to test ws client.
3. Optional: if you're behind proxy check its settings via Proxy settings... button.
4. Specify package for the client, eg. org.netbeans.hello.client.
5. Click Retrieve WSDL.
6. Click Finish.
RESULT: In Projects tab|Hello open Web Service References node.Click on it and there should be reference to MyWS web service. .
2Refresh WSDL
1. Go to Projects tab|Hello|Web Service References|MyWS.
2. Right-click on web service and then select "Refresh WSDL"
RESULT: WSDL of web service in client will be updated .
3Edit Web Service Attributes
1. Go to Projects tab|Hello|Web Service References|MyWS.
2. Right-click on web service and then select "Edit Web Service Attributes"
RESULT: WSDL Customization table will open and you could change ws attributes like ports or bindings .
4Configure Handlers
1. Go to Projects tab|Hello|Web Service References|MyWS.
2. Right-click on web service and then select "Configure Handlers"
RESULT: Configure Handlers dialog window of web service will open.
5Delete web service client
1. Projects tab|Hello|Web Service References|MyWS node.
2. Right-click on web service and then select "Delete" and twice "Yes" in next windows.
RESULT: Web service (and Web Service references node,if the service was last one) should disappear from Projects tab .
Teardown:





Generated: Thu Feb 23 12:24:12 CEST 2006

Project Features

About this Project

QA was started in November 2009, is owned by Jiří Kovalský, and has 97 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close