C.4 Java Web Services Developer Pack (JWSDP)

C.4.1 Windows Platform

Download jwsdp-1_0_01-windows-i586.exe from the site http://java.sun.com/ webservices /downloads/webservicespack.html . Simply invoke the program, and it will set up the JWSDP. Remember to add the following environment variables to point to the JWSDP installation location in Figure C-1, for example.

Figure C-1 Environment Variables Settings for JWSDP
 JAVA_HOME=D:\j2se JWSDP_HOME=D:\Dev\WSDP PATH=%PATH%;D:\Dev\WSDP 

The default TCP port for the embedded TOMCAT server is 8080. If you also need to change to another port (for example, port 8000), you need to modify the server.xml in the %JWSDP_HOME%\conf directory. If you need to use HTTPS, you will also need to make configuration changes in the same file server.xml . In the demo configuration, we use the default port 8080 and do not use HTTPS.

During the installation, you will be prompted to provide an administrator user id and password (that is, with admin, manager, and provider roles). If you need to add a new test user or administrator, you may wish to modify the tomcat-users .xml in the %JWSDP%\conf directory. You should have something like Figure C-2.

Figure C-2 Sample tomcat-users.xml Setting
 <?xml version='1.0'?> <tomcat-users>   <role rolename="admin"/>   <role rolename="manager"/>   <role rolename="user"/>   <role rolename="provider"/>   <user username="goodguy" password="goodguy" roles="user"/>   <user username="otherguy" password="otherguy" roles="user"/>   <user username="ray" password="x792y1z0" roles="admin,manager,provider"/> </tomcat-users> 

This sample tomcat-users.xml file shows three newly added ids, where "ray" is the administrator id (added during installation); " goodguy " and " otherguy " are user ids required by the jSAML demo.

To experience more examples, you may install the JWSDP tutorial examples.

Do not forget to create a " build.properties " file under your home directory (usually c:\Documents and Settings\yourProfile), that contains your username and password. The ANT build tool will authenticate the username and password against the entries in the tomcat-users.xml file. If they do not match the entries in the tomcat-users.xml file, ANT will not compile and execute the scripts successfully.

C.4.2 Unix Platform

The installation procedure is similar to that of the Windows version. Download jwsdp-1_0_01-unix.sh from the site http://java.sun.com/webservices/downloads/webservicespack.html . Simply execute the installation script and specify the target installation location (for example, /opt/jwsdp ) from the installation wizard. Please also add the additional users in the tomcat-users.xml file as in the procedures in the previous section (the procedures are similar to the Windows platform installation).

Upon successful installation, JWSDP will update the Solaris Product Registry under Unclassified Software called "product1." You can verify the set-up by issuing the command " pkginfo " as shown in Figure C-3.

Figure C-3 Verifying the Unix Set-Up Using pkginfo
 # pkginfo -i  grep product1 application IS9419995      product1 

To validate successful set-up, you can invoke the Tomcat server (that is, Web Container) and Xindice database (that is, XML object database supporting UDDI Service Registry) using root access (that is, user id=root). Refer to Figure C-4.

Figure C-4 Start up JWSDP Processes
 #cd /opt/jwsdp/bin #./startup.sh #./xindice-start.sh 

You can also verify that the server processes are running by " ps -ef grep java " and the system will report two processes running in the background, as shown in Figure C-5. The first process with parameter " -Dcom.sun.launcher . displayMinimized " refers to Xindice database start-up, and the second process with parameter " -Dcatalina " refers to the Tomcat Web Container start-up process.

Figure C-5 Verify JWSDP Set-up
[View full width]
 # ps -ef  grep java     root   999     1  0 12:31:46 ?        0:13 /usr/j2sdk141/jre/bin/java -Xms16m -Xmx168m -Dcom.sun.launcher.displayMinimized     root   996     1  0 12:31:35 ? 1:36 /usr/j2sdk141/jre/bin/java-Dcom.sun.launcher graphics/ccc.gif .displayMinimizedFrame= -Dcatalina      root  1305  1301  0 16:07:25 pts/5    0:00 grep java 

C.4.3 Remarks

JWSDP 1.01 was released in August of 2002. One key change from version 1.0 is the use of wscompile and wsdeploy instead of xrpcc to generate client and server stubs. wscompile requires using a new XML configuration file jaxrpc -ri.xml for JAX-RPC. Version 1.01 can also generate WSDL " on-the-fly " by specifying the suffix "?WSDL" for the service end-point.

There is an installation note (under the file location %JWSDP_HOME%\docs\jwsdponj2ee.html) for JWSDP 1.01 on J2EE 1.3.x SDK. JWSDP 1.1 can be configured under a J2EE application server such as the Sun ONE application server. There is a customized installation note jwsdpons1as7.html under JWSDP 1.1. The Sun ONE application server version 7.0 uses a customized version of Apache ANT 1.4.1 called Asant to perform the build processing. Basically, Asant adds Sun ONE application server-specific extension, including sun-appserv-deploy, sun-appserv- undeploy , sun-appserv-instance, sun-appserv-component, sun-appserv-admin, and sun-appserv-jspc.



J2EE Platform Web Services
J2EE Platform Web Services
ISBN: 0131014021
EAN: 2147483647
Year: 2002
Pages: 127
Authors: Ray Lai

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net