If you already went through the process of installing Apache SOAP on iPlanet Application Server using this machine, you can access the SOAP administration page by clicking here.
This document describes how to install Apache SOAP 2.2 on iPlanet Application Server 6.0 and how to exercise the samples bundled with the Apache distribution. The document is organized into several sections:
Installing Apache SOAP
Registering and Exercising the Apache SOAP SamplesChanging Location of the Deployed Services Configuration File (optional)
For Windows, download soap-bin-2.2.zip
For UNIX, download soap-bin-2.2.tar.gz
Extract the SOAP distribution to a suitable location on your machine's file system. For example, to c:\soap-2_2\ or /opt/soap-2_2/.
To use Apache SOAP with iPlanet Application Server, you need to add several JAR files to the application server's classpath.
|
|
|
JAXP Parser (e.g. xerces.jar) | XML Parser library. Download a copy of a JAXP-compatible, namespace-aware XML parser such as Xerces version 1.4 or later. The Xerces Java Parser has been shown to work properly with Apache SOAP 2.2. To avoid conflicts with an XML parser bundled with the application server, ensure the JAXP compatible parser appears at the start of the application server's classpath |
|
SOAP Services | As SOAP services are developed, the service classes must be accessible to the Apache SOAP web application via the application server's classpath. This document will use the convention of deploying these classes to the following directory: install_dir/ias/APPS/soap-services/ |
|
mail.jar | JavaMail library. Note that this library is already in the application server's classpath and does not need to be added again |
|
activation.jar | JavaBeans Activation Framework library. By default, this library is also part of the application server's classpath and does not need to be added again |
|
bsf.jar | Bean Scripting Framework library. This library is used by some of the Apache SOAP samples that rely on server side scripting languages (such as the calculator sample application). Refer to the Apache SOAP installation instructions for pointers to the BSF libraries |
|
js.jar | Rhino JavaScript library. This library is used in conjunction with BSF to provide support for JavaScript. It can be downloaded from the Mozilla.org site (look for the latest BSF-compatible library) |
|
Note that Apache SOAP infrastructure library, soap.jar, is not added to the application server's classpath. Since the Apache SOAP infrastructure classes are already present in the soap.war file, the application server automatically loads these infrastructure classes from the WAR file as the Apache SOAP router servlet is accessed. The same holds true for the Apache SOAP sample application classes. Since these classes are built into the soap.war file, you do not need to make them accessible via the application server's classpath.
c:\xerces-1_4_0\xerces.jar;c:\iplanet\ias6\ias\APPS\soap-services;c:\bsf-2_2\lib\bsf.jar;c:\rhino\js.jar;...
For iPlanet Application Server 6.0 SP2 and earlier, modify the install_dir/ias/bin/kjs script.
...For iPlanet Application Server 6.0 SP3 and later, modify the install_dir/ias/env/iasenv.ksh script.
SOAP_CLASSES=/opt/xerces-1_4_0/xerces.jar:$GX_ROOTDIR/APPS/soap-services:/opt/bsf-2_2/lib/bsf.jar:/opt/rhino/js.jar
CLASSPATH=$SOAP_CLASSES:$THIRD_PARTY_JDBC_CLASSPATH:$GX_ROOTDIR/classes/java/jdbc20.jar:
$GX_ROOTDIR/classes/java/javax.jar:...
...Restart the application server to load the new classpath settings.
# Union of all CLASSPATHS
SOAP_CLASSES=/opt/xerces-1_4_0/xerces.jar:${IAS_ROOT}/APPS/soap-services:/opt/bsf-2_2/lib/bsf.jar:/opt/rhino/js.jar
export CLASSPATH=$SOAP_CLASSES:${TOMCAT_DIR}/jasper.jar:...
Access the RPC Router and Message Router Servlets by accessing the following URLs:http://<web server host>/NASApp/soap/admin/index.html
For example http://localhost/NASApp/soap/admin/index.html
If your Apache SOAP installation is correct, the browser will display:http://<web server host>/NASApp/soap/servlet/rpcrouter
For example http://localhost/NASApp/soap/servlet/rpcrouter
http://<web server host>/NASApp/soap/servlet/messagerouter
For example http://localhost/NASApp/soap/servlet/messagerouter
SOAP (RPC|Message) RouterNow that you've performed a basic test of the environment, you're ready to configure your client environment and exercise the sample applications.
Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me.
|
|
|
mail.jar | JavaMail API | install_dir/ias/classes/java/mail.jar |
activation.jar | JavaBeans Activation Framework | install_dir/ias/classes/java/activation.jar |
soap.jar | Apache SOAP infrastructure | soapinstalldir/lib/soap.jar |
xerces.jar (or equivalent) | A JAXP compatible, namespace-aware XML parser such as Xerces 1.4.0 | xercesinstalldir/xerces.jar |
To help include the necessary libraries in the client's environment, shell scripts have been provided to correctly set the client's classpath. These scripts are named soap_env.bat and soap_env.sh for Windows and UNIX environments respectively, and they're located in the install_dir/ias-samples/soap/docs/ directory. Before executing the scripts, ensure that the environment variables (IAS_HOME, SOAP_HOME, and XERCES_HOME) at the top of each script are set correctly.
http://localhost:8080/soap/servlet/rpcrouterwill need to be changed to:
http://<hostname>:<port>/NASApp/soap/servlet/rpcrouter
If you successfully ran the address sample, then proceed to the Next Steps.D:\soap-2_2\samples\addressbook>testit This test assumes a server URL of http://127.0.0.1/NASApp/soap/servlet/rpcrouterDeploying the addressbook service... . Verify that it's there Deployed Services: urn:AddressFetcher . Getting info for "Mr Good"123 Main Street Anytown, NY 12345 (123) 456-7890 . Adding "John Doe" John Doe has been added. . Query "Mr Doe" to make sure it was added123 Main Street AnyTown, SS 12345 (800) 555-1212 ... <Listing> <Name>Mary Smith</Name> <Address> <StreetNum>888</StreetNum> <StreetName>Broadway</StreetName> <City>Somewhere</City> <State>FL</State> <Zip>87654</Zip> <PhoneNumber> <AreaCode>222</AreaCode> <Exchange>333</Exchange> <Number>4444</Number> </PhoneNumber> </Address> </Listing> </AddressBook> . Undeploy it now . Verify that it's gone Deployed Services:
This error occurs because the XML parser bundled with the application server does not contain a class required by Apache SOAP. Ensure that a JAXP-compatible parser is correctly specified at the start of the applicat server's classpath.D:\soap-2_2\samples\addressbook>testit This test assumes a server URL of http://127.0.0.1/NASApp/soap/servlet/rpcrouter Deploying the addressbook service... Ouch, the call failed: Fault Code = SOAP-ENV:Server.Exception: Fault String = java.lang.NoSuchMethodError ...
If you encounter errors when running the Calculator sample, ensure that you've added both the bsf.jar and js.jar libraries to the start of the application server's classpath.
Experiment by modifying the testit scripts to leave services registered. Restart the application server to observe that registration of services is persistent across server restarts.
Access the Apache SOAP administrative interface to list the registered services:
Select the List option to list the deployed services. Drill down into each service to see the detailed configuration of the service. Since the Calculator service is based on JavaScript, you will see the script code for this service as you list it in the administrative interface.http://<web server host>/NASApp/soap/admin/index.html
For example http://localhost/NASApp/soap/admin/index.html
To exercise more complex examples that involve SOAP services interacting with EJBs, proceed to the Registering and Exercising the iPlanet SOAP Samples section of the documentation.
install_dir/ias/DeployedServices.dsYou can override this default location by creating a soap.xml file containing the path and file name of a services configuration file. The Apache SOAP web application's deployment descriptor also needs to be modified to refer to the location of the soap.xml configuration file.
If you've already deployed SOAP services using the default services configuration file, copy the content of the DeployedServices.ds file to the new location of the services configuration file (the name of the file may be changed as desired).
To change the default location of the services configuration file, follow these steps:
<soapServer> <configManager value="org.apache.soap.server.DefaultConfigManager" > <option name="filename" value="d:\soap-2_2\DeployedServices.ds" /> </configManager> </soapServer>
Under the Init Param tab, click on the New Parameter... button
and enter the following information:
Close and save the deployment descriptor. This will add the following
element to the web.xml
deployment descriptor:
<servlet> <servlet-name>messagerouter</servlet-name> <display-name>Apache-SOAP Message Router</display-name> <servlet-class>org.apache.soap.server.http.MessageRouterServlet</servlet-class> <init-param> <param-name>faultListener</param-name> <param-value>org.apache.soap.server.DOMFaultListener</param-value> </init-param> <init-param> <param-name>ConfigFile</param-name> <param-value>d:\soap-2_2\soap.xml</param-value> <description>Location of the SOAP configuration file</description> </init-param> </servlet>
For more information on other Apache SOAP configuration file settings, refer to the documentation on the Apache SOAP website.
Copyright(c)
2001 Sun Microsystems, Inc. All rights reserved.