From jbosstools-commits at lists.jboss.org Wed Feb 17 14:58:04 2010
Content-Type: multipart/mixed; boundary="===============0278473935100751807=="
MIME-Version: 1.0
From: jbosstools-commits at lists.jboss.org
To: jbosstools-commits at lists.jboss.org
Subject: [jbosstools-commits] JBoss Tools SVN: r20339 -
trunk/ws/docs/reference/en.
Date: Wed, 17 Feb 2010 14:58:04 -0500
Message-ID: <201002171958.o1HJw4N5020345@svn01.web.mwc.hst.phx2.redhat.com>
--===============0278473935100751807==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ochikvina
Date: 2010-02-17 14:58:04 -0500 (Wed, 17 Feb 2010)
New Revision: 20339
Modified:
trunk/ws/docs/reference/en/master.xml
trunk/ws/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1104 - Updated versions,correcte=
d master_output file
Modified: trunk/ws/docs/reference/en/master.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/ws/docs/reference/en/master.xml 2010-02-17 19:56:55 UTC (rev 2033=
8)
+++ trunk/ws/docs/reference/en/master.xml 2010-02-17 19:58:04 UTC (rev 2033=
9)
@@ -29,12 +29,12 @@
=
2008
- 2009
+ 20092010JBoss by Red Hat
- Version: 1.1.0.CR1
+ Version: 1.1.0.CR2
Modified: trunk/ws/docs/reference/en/master_output.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/ws/docs/reference/en/master_output.xml 2010-02-17 19:56:55 UTC (r=
ev 20338)
+++ trunk/ws/docs/reference/en/master_output.xml 2010-02-17 19:58:04 UTC (r=
ev 20339)
@@ -7,698 +7,700 @@
-]>
- =
-
- JBoss WS User Guide
- =
-
-
-
-
- =
-
-
- =
- =
-
- DennyXud=
xu(a)redhat.com
- GridQian=
fqian(a)redhat.com =
- July 2008
-
- 2008
- 2009
- JBoss by Red Hat
-
-
- Version: 1.1.0.CR1
-
-
-
-
- PDF version
-
-
-
-
-
- =
- =
- =
-
- JBossWS Runtime Overview
-
- JBossWS is a web service framework developed as a part of the JB=
oss Application Server. It implements the JAX-WS specification that defines=
a programming model and run-time architecture for implementing web service=
s in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).=
- JBossWS integrates with most current JBoss Application Server re=
leases as well as earlier ones, that did implement the J2EE 1.4 specificati=
ons. Even though JAX-RPC, the web service specification for J2EE 1.4, is st=
ill supported JBossWS does put a clear focus on JAX-WS.
-
-
- Key Features of JBossWS
- For a start, we propose you to look through the table of main fe=
atures of JBossWS Runtime:
-
-
- =
- Key Functionality for JBossWS
-
- =
-
-
- =
- =
-
-
- Feature
- Benefit
- =
-
-
- =
-
- =
-
- JAX-RPC and JAX-WS support
- JBossWS implements both the JAX-WS and JA=
X-RPC specifications.
- =
-
- =
-
- EJB 2.1, EJB3 and JSE endpoints
- JBossWS supports EJB 2.1, EJB3 and JSE as=
Web Service Endpoints.
- =
-
- =
-
- WS-Security 1.0 for XML Encryption/Signat=
ure of the SOAP message
- WS-Security standardizes authorization, e=
ncryption, and digital signature processing of web services.
- =
-
- =
-
- JBoss AS
- JBoss Application Server 5 (JavaEE 5 comp=
liant) web service stack.
- =
-
- =
-
- Support for MTOM/XOP and SwA-Ref=
entry>
- Message Transmission Optimization Mechani=
sm (MTOM) and XML-binary Optimized Packaging (XOP) more efficiently seriali=
ze XML Infosets that have certain types of content.
- =
-
- =
-
- =
-
-
- =
- =
-
-
- Other relevant resources on the topic
-
- You can find some extra information on:
-
-
-
- JBossWS Tools Wiki FAQ.
-
-
-
-
- =
-
-
- =
- =
-
-
- =
-
-
-
-
- JBoss Tools
- Web Service
- JBossWS Web Service runtime
-
-
-
- Creating a Web Service using JBossWS runtime
- In this chapter we provide you with the necessary steps to create=
a Web Service using
- JBossWS runtime. First you need to create a Dynamic Web project:
-
-
- Creating a Dynamic Web project
-
- Before creating a web service, you should have a Dynamic Web P=
roject created:
-
- Dynamic Web Project
-
-
-
-
-
-
- Create a Web project by selecting
- New > Project... > Dynamic W=
eb project. Enter the following information:
-
-
- Project Name: enter a project name
-
-
- Target runtime: any server depending on your installatio=
n. If it is not listed,
- click New button and=
browse to the location where it is installed to. You may set
- Target Runtime
- to
- None, =
in this case, you should add JBoss Web Service
- facet to the project.
-
- Dynamic Web Project Wizard
-
-
-
-
-
-
-
-
- Configuration: You may add JB=
oss Web Service
- facet to the project by clicking Modify... button. The opened page is like Figure 2.4.
-
-
- Configure Web Module values:
-
- Web Module Settings Configuration
-
-
-
-
-
-
-
-
- If you added the JBoss Web Service facet to the project, now t=
he Finish button is disable. You mus=
t click Next button to set more info=
rmation about the JBoss Web Service facet. The page is like Figure 2.5. Then click on the Finish button.
- If you didn't add the JBoss Web Service facet to the project, =
click on the Finish button. Next you=
will need to add JBoss Web Service facet to the project.
-
-
-
- Configure JBoss Web Service facet settings
- If you have already created a new Dynamic Web project and not =
set the JBoss Web Service facet to the project, the next step is to add JBo=
ss Web
- Service facet to the project. Right-click on the project, select =
its Properties =
and then find Project Facets in the tree-view on the l=
eft-side of the project properties dialog. =
- Tick on the check box for JBoss Web Services. You will see what l=
ike this:
-
- Choose JBoss Web Service Facet
-
-
- <=
/imagedata>
-
-
- =
- At the bottom-left of the right-side of the project properties=
dialog, there is a error link: Furth=
er configuration required... . You must click the lin=
k to set more information about JBoss Web Service facet.
- Click on the Further con=
figuration required... link. In the opened window =
-
- Configure JBoss Web Service Facet
-
-
-
-
-
-
- Server Supplied JBossWS Runtime: If you have already set a JBo=
ss runtime to the
- project's target runtime, you may choose
- Server Supplied JBossWS Runtime
- and then click
- Ok
- to finish the configuration of JBoss Web Service face=
t.
- If the project has no
- Target Runtime
- settings, you should check the second radio button an=
d specify a JBossWS
- runtime from the list. You also can create a new JBossWS runtime,=
click on the
- New...
- button will bring you to another dialog to configure =
new JBossWS runtime.
-
- Configure JBossWS Runtime
-
-
-
-
-
-
- See how to configure a new JBossWS runtime here.
- After setting the information about JBoss Web Service facet, f=
or saving the result, you should click the Appl=
y or OK button at the bot=
tom-right of the right-side of the project properties dialog.
-
-
-
-
- Creating a Web Service from a WSDL document using JBossWS run=
time
- In this chapter we provide you with the necessary steps to cre=
ate a Web Service from a
- WSDL document using JBossWS runtime.
- At first, please make sure that you have already created a dyn=
amic Web project with
- JBoss Web Service facet installed.
- See how to make it here=
and here.
-
- To create a Web Service using JBossWS runtime select
- File > New > Other > Web =
Services > Web Service
- to run Web Service creation wizard.
- Let's get through the wizard step-by-step:
-
- New Web Service Wizard
-
-
-
-
-
-
- First, please select Top down Java=
bean Web Service from the Web
- Service type list, and select a WSDL document from workspace, cli=
ck on the Server name
- link on the page will bring you to another dialog. Here you can s=
pecify the server to a
- JBoss Server and Web Service runtime to JBossWS runtime:
-
- Select Server and Web Service runtime
-
-
-
-
-
-
-
- Click on the
- Finish
- button to see the next wizard view opened:
-
-
- New Web Service Wizard
-
-
-
-
-
-
-
- Click on the
- Next
- button to proceed:
-
- New Web Service Wizard
-
-
-
-
-
-
- On this page, the default package name comes from the namespac=
e of the WSDL document,
- you also can change it to any valid package name you want. JAX-WS=
specification should be
- set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS nat=
ive runtime. You can
- specify a catalog file and binding files if you have them. If you=
want the wizard to
- generate empty implementation classes for the Web Service, check =
the
- Generate default Web Service imple=
mentation classes
- check box. If you want to update the default Web.xml =
file with the Web Service
- servlets configured, check the
- Update the default Web.xml
- check box. Click on the
- Next
- or on the
- Finish
- button to generate code.
-
- Once the Web Service code is generated, you can view the imple=
mentation class and add
- business logic to each method.
-
- The generated implementation Java code
-
-
-
-
-
-
- View the Web.xml file:
-
- Web.xml
-
-
-
-
-
-
-In the next chapter you will find out how to create a Web service fr=
om a Java bean.
-
-
-
- Creating a Web service from a Java bean using JBossWS runtime=
- The Web Service wizard assists you in creating a new Web servi=
ce, configuring it for
- deployment, and then deploying it to the server.
- To create a Web service from a bean using JBoss WS:
- Setup JBoss WS and development en=
vironment.
- Create a Dynamic Web project=
link>.
- Add JBossWS Facet to Web pro=
ject.
- Create a Web Service from a java bean:
-
-
- Switch to the Java EE perspective
- Window > Open Perspective=
> Java EE.
-
-
- In the Project Explorer view, select the bean that you c=
reated or imported into
- the source folder of your Web project.
-
- Select the Bean Created
-
-
-
-
-
-
-
-
- Click
- File > New > Other. Select Web Services in order to display various Web ser=
vice wizards.
- Select the Web Service wizard. Click on the Next button.
-
- New Web Service
-
-
-
-
-
-
-
-
- On the first Web Service wizard page: select Bottom up Java bean Web
- service as your Web service type, and select =
the Java bean from which
- the service will be created:
-
- Set Web Service Common values
-
-
-
-
-
-
-
-
- Select the stages of Web service development that =
you want to complete using
- the slider:
-
-
- Develop: this will develop the WSDL definiti=
on and implementation of
- the Web service. This includes such tasks as cr=
eating modules that will
- contain generated code, WSDL files, deployment =
descriptors, and Java
- files when appropriate.
-
-
- Assemble: this ensures the project that will=
host the Web service or
- client gets associated to an EAR when required =
by the target application
- server.
-
-
- Deploy: this will create the deployment code=
for the service.
-
-
- Install: this will install and configure the=
Web module and EARs on
- the target server.
-
-
- Start: this will start the server once the s=
ervice has been installed
- on it. The server-config.wsdd file will be gene=
rated.
-
-
- Test: this will provide various options for =
testing the service, such
- as using the Web Service Explorer or sample JSP=
s.
-
-
-
- =
- Select your server: the default server is displaye=
d. If you want to deploy
- your service to a different server click the link to spe=
cify a different server.
-
-
-
- Select your runtime: ensure the JBoss WS runtime i=
s selected.
-
-
- Select the service project: the project selected i=
n your workspace is
- displayed. To select a different project click on the pr=
oject link. If you are
- deploying to JBoss Application Server you will also be a=
sked to select the EAR
- associated with the project. Ensure that the project sel=
ected as the Client Web
- Project is different from the Service Web Project, or th=
e service will be
- overwritten by the client's generated artifacts.
-
-
- If you want to create a client, select the type of=
proxy to be generated
- and repeat the above steps for the client. The better wa=
y is to create a web
- service client project separately.
-
-
- Click on the Next=
button.
-
-
- On the JBoss Web Service Code Generation Configuration p=
age, set the following
- values:
-
- Set Web Service values for Code Generation
-
-
-
-
-
-
-
-
- Generate WSDL file: select it, you will get a gene=
rated WSDL file in your
- project. But this wsdl's services' address location v=
alues are not a real
- address.
-
-
- After the Web service has been created, the follow=
ing option can become
- available depending on the options you selected: Update =
the default web.xm
- file. If selected, you may test the web service by Ex=
plorer.
-
-
- Click on the Next=
button.
-
-
- On this page, the project is deployed to the server. You=
can start the server and
- test the web service. If you want to publish the web servic=
e to a UDDI registry, you
- may click the Next b=
utton to publish it. If not, you may click
- the Finish button.=
para>
-
- Start a Server
-
-
-
-
-
-
-
-
- After the Web Service has been created, the following options =
may become available
- depending on the options selected:
-
-
- the generated web services code
-
-
- If you selected to generate a WSDL file, you will get th=
e file in your project's wsdl folder.
-
- The Generated HelloWorldService.wsdl File in the wsd=
l Folder
-
-
-
-
-
-
-
-
- If you selected to update the default web.xml, you will =
test the web service in
- the browser. Open the Explorer, input the url for the web s=
ervice according to
- web.xml plus ?wsdl.,=
you will get the WSDL file from Explorer.
-
- The Updated web.xml file
-
-
-
-
-
-
-
-
- In the next chapter you will be able to create a Web Service Clien=
t from a WSDL document using JBoss WS.
- =
-
-
-
-
- =
-
- Creating a Web Service Client from a WSDL Document using JBoss WS=
- To create a Web Service Client from a WSDL Document using JBoss WS=
you need to fulfil the following steps:
- Setup JBoss WS and development enviro=
nment.
- Create a Dynamic Web project.
- Add JBossWS Facet to Web project=
.
- Then you can create a Web Service Client from a WSDL document:
-
-
- Switch to the Java EE perspective Window > Open Perspective > Java EE.
-
-
- Click File > New=
> Other. Select Web Services in order to display =
the various Web service wizards. Select the Web Service Client wizard. Clic=
k on the Next button. =
-
- New Web Service Client
-
-
-
-
-
-
-
-
- The first and the second Web Service Client wizard pages =
are the same as for Web Service from a =
WSDL document. =
-
- Set Web Service Common values
-
-
-
-
-
-
-
- Set Web Service values related to WSDL file
-
-
-
-
-
-
- The only difference is:
-
-
- Client Type: Support of Java Proxy only.
-
-
- Click on the Finish button.
- =
-
- After the Web Service Client has been created, the following ma=
y occur depending on the options you selected:
-
-
- the generated web service and client codes
-
-
- a client sample class.
-
- Client Sample Class
-
-
-
-
-
-
-
-
- JBoss WS use a Java class to test Web Service. A client sample =
class will be generated, you may run this client as a java application to c=
all a web service.
-
-
- =
-
- JBoss WS and development environment
- =
- In this chapter you will learn how to change JBossWS preferences=
and how to set default server and runtime.
-
- =
- =
- JBossWS Preferences
-
- In this section you will know how JBossWS preferences can be=
modified during the
- development process.
-
- JBossWS preferences can be set on the JBossWS preference pag=
e. Click on
- Window > Pref=
erences > JBoss Tools > Web > JBossWS
- Preferences.
-
- On this page you can manage the JBossWS Runtime. Use the app=
ropriate buttons to
- Add more runtimes o=
r to Remove those that
- are not needed.
-
-
- JBossWS Preferences Page
-
-
-
-
-
-
-
- Clicking on
- Add
- or
- Edit
- button will open the form where you can configure =
a new JBossWS runtime and
- change the path to JBossWS runtime home folder, modify the nam=
e and version of the
- existing JBossWS runtime settings. Press Finish to apply the
- changes.
-
-
- Edit JBossWS Runtime
-
-
-
-
-
-
- =
- =
- =
- =
- WS container allows Source and JavaDoc locations to be set v=
ia the Properties dialog on each contained .jar: right-click on any .jar fi=
le in the Project Explorer view, select Properties. Choose Java Source Attachment and select location (fo=
lder, JAR or zip) containing new source for the chosen .jar using one of th=
e suggested options (workspace, external folder or file) or enter the path =
manually:
- =
-
- Classpath Container: Java Source Attachment
-
-
-
-
-
-
- Click on Apply and then on Ok.
- To change JavaDoc Location choose Javadoc Location and specify URL to the d=
ocumentation generated by Javadoc. The Javadoc location will contain a file=
called package-list:
- =
-
- Classpath Container: Javadoc Location
-
-
-
-
-
-
- Click on Apply and then on Ok.
- =
- =
- =
- =
- =
- =
-
-
- Default Server and Runtime
- Open
- Window > Preferences > W=
eb Services > Server and Runtime. On this page, yo=
u can specify a default server and runtime.
- For ease of use, the better way is to set runtime to JBoss W=
S.
- After server and runtime are specified, click on the Apply button
- to save the values.
-
- Specifing a default server and runtime
-
-
-
-
-
-
-
- On the whole, this guide covers the fundamental concepts of =
work with tooling for
- JBossWS. It describes h=
ow to easily create a Web Service and a Web Service Client using
- JBossWS Runtime and adjust JBossWS and development environment=
as well.
-
- If the information on JBossWS tools in this guide isn't enou=
gh for you, ask
- questions on our forum. Your comments a=
nd suggestions are also welcome.
-
-
-
-
+]>
+ =
+
+ JBoss WS User Guide
+ =
+
+
+
+
+ =
+
+
+ =
+ =
+
+ DennyXud=
xu(a)redhat.com
+ GridQian=
fqian(a)redhat.com =
+ =
+
+ 2008
+ 2009
+ 2010
+ JBoss by Red Hat
+
+
+ Version: 1.1.0.CR2
+
+
+
+
+ PDF version
+
+
+
+
+
+ =
+ =
+ =
+
+ JBossWS Runtime Overview
+
+ JBossWS is a web service framework developed as a part of the JB=
oss Application Server. It implements the JAX-WS specification that defines=
a programming model and run-time architecture for implementing web service=
s in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).=
+ JBossWS integrates with most current JBoss Application Server re=
leases as well as earlier ones, that did implement the J2EE 1.4 specificati=
ons. Even though JAX-RPC, the web service specification for J2EE 1.4, is st=
ill supported JBossWS does put a clear focus on JAX-WS.
+
+
+ Key Features of JBossWS
+ For a start, we propose you to look through the table of main fe=
atures of JBossWS Runtime:
+
+
+ =
+ Key Functionality for JBossWS
+
+ =
+
+
+ =
+ =
+
+
+ Feature
+ Benefit
+ =
+
+
+ =
+
+ =
+
+ JAX-RPC and JAX-WS support
+ JBossWS implements both the JAX-WS and JA=
X-RPC specifications.
+ =
+
+ =
+
+ EJB 2.1, EJB3 and JSE endpoints
+ JBossWS supports EJB 2.1, EJB3 and JSE as=
Web Service Endpoints.
+ =
+
+ =
+
+ WS-Security 1.0 for XML Encryption/Signat=
ure of the SOAP message
+ WS-Security standardizes authorization, e=
ncryption, and digital signature processing of web services.
+ =
+
+ =
+
+ JBoss AS
+ JBoss Application Server 5 (JavaEE 5 comp=
liant) web service stack.
+ =
+
+ =
+
+ Support for MTOM/XOP and SwA-Ref=
entry>
+ Message Transmission Optimization Mechani=
sm (MTOM) and XML-binary Optimized Packaging (XOP) more efficiently seriali=
ze XML Infosets that have certain types of content.
+ =
+
+ =
+
+ =
+
+
+ =
+ =
+
+
+ Other relevant resources on the topic
+
+ You can find some extra information on:
+
+
+
+ JBossWS Tools Wiki FAQ.
+
+
+
+
+ =
+
+
+ =
+ =
+
+
+ =
+
+
+
+
+ JBoss Tools
+ Web Service
+ JBossWS Web Service runtime
+
+
+
+ Creating a Web Service using JBossWS runtime
+ In this chapter we provide you with the necessary steps to create=
a Web Service using
+ JBossWS runtime. First you need to create a Dynamic Web project:
+
+
+ Creating a Dynamic Web project
+
+ Before creating a web service, you should have a Dynamic Web P=
roject created:
+
+ Dynamic Web Project
+
+
+
+
+
+
+ Create a Web project by selecting
+ New > Project... > Dynamic W=
eb project. Enter the following information:
+
+
+ Project Name: enter a project name
+
+
+ Target runtime: any server depending on your installatio=
n. If it is not listed,
+ click New button and=
browse to the location where it is installed to. You may set
+ Target Runtime
+ to
+ None, =
in this case, you should add JBoss Web Service
+ facet to the project.
+
+ Dynamic Web Project Wizard
+
+
+
+
+
+
+
+
+ Configuration: You may add JB=
oss Web Service
+ facet to the project by clicking Modify... button. The opened page is like Figure 2.4.
+
+
+ Configure Web Module values:
+
+ Web Module Settings Configuration
+
+
+
+
+
+
+
+
+ If you added the JBoss Web Service facet to the project, now t=
he Finish button is disable. You mus=
t click Next button to set more info=
rmation about the JBoss Web Service facet. The page is like Figure 2.5. Then click on the Finish button.
+ If you didn't add the JBoss Web Service facet to the project, =
click on the Finish button. Next you=
will need to add JBoss Web Service facet to the project.
+
+
+
+ Configure JBoss Web Service facet settings
+ If you have already created a new Dynamic Web project and not =
set the JBoss Web Service facet to the project, the next step is to add JBo=
ss Web
+ Service facet to the project. Right-click on the project, select =
its Properties =
and then find Project Facets in the tree-view on the l=
eft-side of the project properties dialog. =
+ Tick on the check box for JBoss Web Services. You will see what l=
ike this:
+
+ Choose JBoss Web Service Facet
+
+
+ <=
/imagedata>
+
+
+ =
+ At the bottom-left of the right-side of the project properties=
dialog, there is a error link: Furth=
er configuration required... . You must click the lin=
k to set more information about JBoss Web Service facet.
+ Click on the Further con=
figuration required... link. In the opened window =
+
+ Configure JBoss Web Service Facet
+
+
+
+
+
+
+ Server Supplied JBossWS Runtime: If you have already set a JBo=
ss runtime to the
+ project's target runtime, you may choose
+ Server Supplied JBossWS Runtime
+ and then click
+ Ok
+ to finish the configuration of JBoss Web Service face=
t.
+ If the project has no
+ Target Runtime
+ settings, you should check the second radio button an=
d specify a JBossWS
+ runtime from the list. You also can create a new JBossWS runtime,=
click on the
+ New...
+ button will bring you to another dialog to configure =
new JBossWS runtime.
+
+ Configure JBossWS Runtime
+
+
+
+
+
+
+ See how to configure a new JBossWS runtime here.
+ After setting the information about JBoss Web Service facet, f=
or saving the result, you should click the Appl=
y or OK button at the bot=
tom-right of the right-side of the project properties dialog.
+
+
+
+
+ Creating a Web Service from a WSDL document using JBossWS run=
time
+ In this chapter we provide you with the necessary steps to cre=
ate a Web Service from a
+ WSDL document using JBossWS runtime.
+ At first, please make sure that you have already created a dyn=
amic Web project with
+ JBoss Web Service facet installed.
+ See how to make it here=
and here.
+
+ To create a Web Service using JBossWS runtime select
+ File > New > Other > Web =
Services > Web Service
+ to run Web Service creation wizard.
+ Let's get through the wizard step-by-step:
+
+ New Web Service Wizard
+
+
+
+
+
+
+ First, please select Top down Java=
bean Web Service from the Web
+ Service type list, and select a WSDL document from workspace, cli=
ck on the Server name
+ link on the page will bring you to another dialog. Here you can s=
pecify the server to a
+ JBoss Server and Web Service runtime to JBossWS runtime:
+
+ Select Server and Web Service runtime
+
+
+
+
+
+
+
+ Click on the
+ Finish
+ button to see the next wizard view opened:
+
+
+ New Web Service Wizard
+
+
+
+
+
+
+
+ Click on the
+ Next
+ button to proceed:
+
+ New Web Service Wizard
+
+
+
+
+
+
+ On this page, the default package name comes from the namespac=
e of the WSDL document,
+ you also can change it to any valid package name you want. JAX-WS=
specification should be
+ set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS nat=
ive runtime. You can
+ specify a catalog file and binding files if you have them. If you=
want the wizard to
+ generate empty implementation classes for the Web Service, check =
the
+ Generate default Web Service imple=
mentation classes
+ check box. If you want to update the default Web.xml =
file with the Web Service
+ servlets configured, check the
+ Update the default Web.xml
+ check box. Click on the
+ Next
+ or on the
+ Finish
+ button to generate code.
+
+ Once the Web Service code is generated, you can view the imple=
mentation class and add
+ business logic to each method.
+
+ The generated implementation Java code
+
+
+
+
+
+
+ View the Web.xml file:
+
+ Web.xml
+
+
+
+
+
+
+In the next chapter you will find out how to create a Web service fr=
om a Java bean.
+
+
+
+ Creating a Web service from a Java bean using JBossWS runtime=
+ The Web Service wizard assists you in creating a new Web servi=
ce, configuring it for
+ deployment, and then deploying it to the server.
+ To create a Web service from a bean using JBoss WS:
+ Setup JBoss WS and development en=
vironment.
+ Create a Dynamic Web project=
link>.
+ Add JBossWS Facet to Web pro=
ject.
+ Create a Web Service from a java bean:
+
+
+ Switch to the Java EE perspective
+ Window > Open Perspective=
> Java EE.
+
+
+ In the Project Explorer view, select the bean that you c=
reated or imported into
+ the source folder of your Web project.
+
+ Select the Bean Created
+
+
+
+
+
+
+
+
+ Click
+ File > New > Other. Select Web Services in order to display various Web ser=
vice wizards.
+ Select the Web Service wizard. Click on the Next button.
+
+ New Web Service
+
+
+
+
+
+
+
+
+ On the first Web Service wizard page: select Bottom up Java bean Web
+ service as your Web service type, and select =
the Java bean from which
+ the service will be created:
+
+ Set Web Service Common values
+
+
+
+
+
+
+
+
+ Select the stages of Web service development that =
you want to complete using
+ the slider:
+
+
+ Develop: this will develop the WSDL definiti=
on and implementation of
+ the Web service. This includes such tasks as cr=
eating modules that will
+ contain generated code, WSDL files, deployment =
descriptors, and Java
+ files when appropriate.
+
+
+ Assemble: this ensures the project that will=
host the Web service or
+ client gets associated to an EAR when required =
by the target application
+ server.
+
+
+ Deploy: this will create the deployment code=
for the service.
+
+
+ Install: this will install and configure the=
Web module and EARs on
+ the target server.
+
+
+ Start: this will start the server once the s=
ervice has been installed
+ on it. The server-config.wsdd file will be gene=
rated.
+
+
+ Test: this will provide various options for =
testing the service, such
+ as using the Web Service Explorer or sample JSP=
s.
+
+
+
+ =
+ Select your server: the default server is displaye=
d. If you want to deploy
+ your service to a different server click the link to spe=
cify a different server.
+
+
+
+ Select your runtime: ensure the JBoss WS runtime i=
s selected.
+
+
+ Select the service project: the project selected i=
n your workspace is
+ displayed. To select a different project click on the pr=
oject link. If you are
+ deploying to JBoss Application Server you will also be a=
sked to select the EAR
+ associated with the project. Ensure that the project sel=
ected as the Client Web
+ Project is different from the Service Web Project, or th=
e service will be
+ overwritten by the client's generated artifacts.
+
+
+ If you want to create a client, select the type of=
proxy to be generated
+ and repeat the above steps for the client. The better wa=
y is to create a web
+ service client project separately.
+
+
+ Click on the Next=
button.
+
+
+ On the JBoss Web Service Code Generation Configuration p=
age, set the following
+ values:
+
+ Set Web Service values for Code Generation
+
+
+
+
+
+
+
+
+ Generate WSDL file: select it, you will get a gene=
rated WSDL file in your
+ project. But this wsdl's services' address location v=
alues are not a real
+ address.
+
+
+ After the Web service has been created, the follow=
ing option can become
+ available depending on the options you selected: Update =
the default web.xm
+ file. If selected, you may test the web service by Ex=
plorer.
+
+
+ Click on the Next=
button.
+
+
+ On this page, the project is deployed to the server. You=
can start the server and
+ test the web service. If you want to publish the web servic=
e to a UDDI registry, you
+ may click the Next b=
utton to publish it. If not, you may click
+ the Finish button.=
para>
+
+ Start a Server
+
+
+
+
+
+
+
+
+ After the Web Service has been created, the following options =
may become available
+ depending on the options selected:
+
+
+ the generated web services code
+
+
+ If you selected to generate a WSDL file, you will get th=
e file in your project's wsdl folder.
+
+ The Generated HelloWorldService.wsdl File in the wsd=
l Folder
+
+
+
+
+
+
+
+
+ If you selected to update the default web.xml, you will =
test the web service in
+ the browser. Open the Explorer, input the url for the web s=
ervice according to
+ web.xml plus ?wsdl.,=
you will get the WSDL file from Explorer.
+
+ The Updated web.xml file
+
+
+
+
+
+
+
+
+ In the next chapter you will be able to create a Web Service Clien=
t from a WSDL document using JBoss WS.
+ =
+
+
+
+
+ =
+
+ Creating a Web Service Client from a WSDL Document using JBoss WS=
+ To create a Web Service Client from a WSDL Document using JBoss WS=
you need to fulfil the following steps:
+ Setup JBoss WS and development enviro=
nment.
+ Create a Dynamic Web project.
+ Add JBossWS Facet to Web project=
.
+ Then you can create a Web Service Client from a WSDL document:
+
+
+ Switch to the Java EE perspective Window > Open Perspective > Java EE.
+
+
+ Click File > New=
> Other. Select Web Services in order to display =
the various Web service wizards. Select the Web Service Client wizard. Clic=
k on the Next button. =
+
+ New Web Service Client
+
+
+
+
+
+
+
+
+ The first and the second Web Service Client wizard pages =
are the same as for Web Service from a =
WSDL document. =
+
+ Set Web Service Common values
+
+
+
+
+
+
+
+ Set Web Service values related to WSDL file
+
+
+
+
+
+
+ The only difference is:
+
+
+ Client Type: Support of Java Proxy only.
+
+
+ Click on the Finish button.
+ =
+
+ After the Web Service Client has been created, the following ma=
y occur depending on the options you selected:
+
+
+ the generated web service and client codes
+
+
+ a client sample class.
+
+ Client Sample Class
+
+
+
+
+
+
+
+
+ JBoss WS use a Java class to test Web Service. A client sample =
class will be generated, you may run this client as a java application to c=
all a web service.
+
+
+ =
+
+ JBoss WS and development environment
+ =
+ In this chapter you will learn how to change JBossWS preferences=
and how to set default server and runtime.
+
+ =
+ =
+ JBossWS Preferences
+
+ In this section you will know how JBossWS preferences can be=
modified during the
+ development process.
+
+ JBossWS preferences can be set on the JBossWS preference pag=
e. Click on
+ Window > Pref=
erences > JBoss Tools > Web > JBossWS
+ Preferences.
+
+ On this page you can manage the JBossWS Runtime. Use the app=
ropriate buttons to
+ Add more runtimes o=
r to Remove those that
+ are not needed.
+
+
+ JBossWS Preferences Page
+
+
+
+
+
+
+
+ Clicking on
+ Add
+ or
+ Edit
+ button will open the form where you can configure =
a new JBossWS runtime and
+ change the path to JBossWS runtime home folder, modify the nam=
e and version of the
+ existing JBossWS runtime settings. Press Finish to apply the
+ changes.
+
+
+ Edit JBossWS Runtime
+
+
+
+
+
+
+ =
+ =
+ =
+ =
+ WS container allows Source and JavaDoc locations to be set v=
ia the Properties dialog on each contained .jar: right-click on any .jar fi=
le in the Project Explorer view, select Properties. Choose Java Source Attachment and select location (fo=
lder, JAR or zip) containing new source for the chosen .jar using one of th=
e suggested options (workspace, external folder or file) or enter the path =
manually:
+ =
+
+ Classpath Container: Java Source Attachment
+
+
+
+
+
+
+ Click on Apply and then on Ok.
+ To change JavaDoc Location choose Javadoc Location and specify URL to the d=
ocumentation generated by Javadoc. The Javadoc location will contain a file=
called package-list:
+ =
+
+ Classpath Container: Javadoc Location
+
+
+
+
+
+
+ Click on Apply and then on Ok.
+ =
+ =
+ =
+ =
+ =
+ =
+
+
+ Default Server and Runtime
+ Open
+ Window > Preferences > W=
eb Services > Server and Runtime. On this page, yo=
u can specify a default server and runtime.
+ For ease of use, the better way is to set runtime to JBoss W=
S.
+ After server and runtime are specified, click on the Apply button
+ to save the values.
+
+ Specifing a default server and runtime
+
+
+
+
+
+
+
+ On the whole, this guide covers the fundamental concepts of =
work with tooling for
+ JBossWS. It describes h=
ow to easily create a Web Service and a Web Service Client using
+ JBossWS Runtime and adjust JBossWS and development environment=
as well.
+
+ If the information on JBossWS tools in this guide isn't enou=
gh for you, ask
+ questions on our =
+ forum. Your comments and suggestions are=
also welcome.
+
+
+
+
--===============0278473935100751807==--