Change to the StandAloneStockClient directory:
cd /opt/wsp/samples/jboss/StandAloneStockClient
Edit the src/com/samples/SecuringWS.java file as follows:.
Change any references to localhost and 8080, depending on your deployment
Change the providerNamestring to "wsc".
In the /opt/wss/samples/jboss/StandAloneStockClient directory, modify build.xml for JBoss Application Server rather than GlassFish:
<?xml version="1.0" encoding="UTF-8"?> <project name="StandAloneStockClient" default="default" basedir="."> <description>Builds, tests, and runs the project stockclient.</description> <property file="../jboss.properties"/> <property name="is.java-client.module" value="true"/> <target name="default" depends="run"/> <target name="build" depends="clean"> <mkdir dir="build/classes"/> <javac srcdir="src" destdir="build/classes" classpath="xyz.jar" debug="on"> <classpath> <pathelement location="${wsp.home}/lib/openssowssproviders.jar"/> <pathelement location="${wsp.home}/lib/webservices-rt.jar"/> <pathelement location="${wsp.home}/lib/openssoclientsdk.jar"/> <pathelement location="${wsp.home}/lib/xalan.jar"/> <pathelement location="${wsp.home}/lib/xercesImpl.jar"/> <pathelement location="${wsp.home}/lib/j2ee.jar"/> <pathelement location="${wsp.home}/lib"/> <pathelement path="build/classes"/> </classpath> </javac> </target> <target name="run" depends="build"> <echo>java.home=${java.home}</echo> <java classname="com.samples.SecuringWS" fork="true"> <classpath> <pathelement location="${wsp.home}/lib/openssowssproviders.jar"/> <pathelement location="${wsp.home}/lib/ldapjdk.jar"/> <pathelement location="${wsp.home}/lib/webservices-rt.jar"/> <pathelement location="${wsp.home}/lib/openssoclientsdk.jar"/> <pathelement location="${wsp.home}/lib/xalan.jar"/> <pathelement location="${wsp.home}/lib/xercesImpl.jar"/> <pathelement location="${wsp.home}/lib/j2ee.jar"/> <pathelement location="${wsp.home}/lib"/> <pathelement path="build/classes"/> </classpath> </java> </target> <target name="clean"> <delete dir="dist"/> <delete dir="build"/> </target> </project>
Modify /opt/wsp/lib/AMConfig.properties depending on your setup, so that the StandAloneStockClient sample sends a secure web service request:
com.iplanet.services.debug.level=error com.iplanet.services.debug.directory=/tmp/wss com.iplanet.am.naming.url=http://opensso-host:port/opensso/namingservice com.sun.identity.agents.app.username=amadmin com.iplanet.am.service.password=amadmin-password com.iplanet.am.service.secret= am.encryption.pwd= com.sun.identity.client.encryptionKey= com.iplanet.am.server.protocol=http com.iplanet.am.server.host=opensso-host com.iplanet.am.server.port=port com.iplanet.am.services.deploymentDescriptor=/opensso com.iplanet.am.cookie.name=iPlanetDirectoryPro com.sun.identity.saml.xmlsig.keystore=/opt/wsp/resources/keystore.jks com.sun.identity.saml.xmlsig.storepass=/opt/wsp/resources/.storepass com.sun.identity.saml.xmlsig.keypass=/opt/wsp/resources/.keypass com.sun.identity.saml.xmlsig.certalias=cert-alias com.sun.identity.loginurl=http://your-opensso-hostname:port/opensso/UI/Login com.sun.identity.liberty.authnsvc.url=http://opensso-host:port/opensso/Liberty/authnsvc
Execute the StandAloneStockClient. For example:
/share/builds/components/ant/1.6.5/bin/ant -f build.xml.
You should see the requests and responses. Also, check the JBoss Application Server agent debug file.