Build JAX-WS 2.0 services using NetBeans 5.0 and GlassFish

Source: Internet
Author: User
Tags glassfish netbeans wsdl

The first section describes how to set up the NetBeans IDE and create a GlassFish library. The second section contains information about creating a Web service project and the sample code that is used. The last section describes the techniques for creating your own Web service using this project, as well as a guide to creating a service from WSDL. Note that the jax-ws2.0 application requires j2se5.0. The latest JDK can be downloaded from the http://Java.sun.com.

Note: To create a Web service using the jas-ws2.0 workspace, rather than using GlassFish, understand this version of this article instead.

Directory

1. Set up NetBeans and GlassFish

2. Establish a project

 Create a service from Java

 Create a client

 Use NetBeans Web Services Registry

 Debug Applications

3. Skill

Prepare your own service

 Create a service from WSDL

Setting up NetBeans and GlassFish

This article is written using NetBeans5.0 Beta2, and more information about NetBeans, including this application, can be obtained from the netbeans.org Web site. If you are unfamiliar with this integrated development environment, wizards and guides on the site can help you build your environment and run it.

To get the GlassFish application server, visit the GlassFish website and click the Download Now button. Install a GlassFish binary package according to the instructions, using either build B28 or an updated version. This article will be simplified to the "GlassFish" folder when referring to the installation folder. Note: As the ant target changes in Jax-ws, the examples in the article can only be run on the GlassFish build b28 date of November 23 or later. In order to use an earlier version, you must change the properties of Wsimport and/or Wsgen target. For more details, refer to Jax-ws or glassfish documentation.

After NetBeans and GlassFish are installed, use these steps to add servers to NetBeans, and then create GlassFish libraries to be used for engineering purposes. In NetBeans, click Tools in the menu bar to select Server Manager. Click Add Server, select Sun Java System Application Server from the Server menu, and then enter a name for the server, such as "GlassFish", and click Next. Enter the path to your "GlassFish" folder on the next screen, then click Next, accept the default domain of the registrar, and click "Next". On the last screen, enter the admin password and click Finish. The default password for the package is given on the GlassFish Quick Start page. Click Close to exit Server Manager. Note: There are currently two available servers under the server node in the Runtime tab.

To create the library that will be used in the project, click Tools in the menu bar, and then select Library Manager. Click on the new library and enter a name for the gallery, such as "GlassFish". Press OK, because the "ClassPath" tab is still open, click Add Jar/folder, browse your Glassfish/lib folder, select all the JAR files (press SHIFT while clicking the selected file). Click Add Jar/folder, and then click OK. This library is not necessary to create a service, because some of the jar files GlassFish at run time are already contained in NetBeans Classpath. This library will be used at a later time to run the test client.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.