WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results
             New or updated topic for this feature pack

Running Thin application client code on a client machine

This topic provides the steps necessary to run Thin application client code on a client machine.

Before you begin

You must install the Thin application client from the Application Client for WebSphere Application Server installation before performing this task. For more information, see Developing Thin application client code.

Procedure

  1. Set up the Thin application client environment. Run the setupClient command.
    [Windows]
    app_client_root\AppClient\bin\setupClient.bat
    [AIX] [Linux] [HP-UX] [Solaris] [z/OS]
    app_client_root/AppClient/bin/setupClient.sh
    [i5/OS] Use the setupClient script.
    1. Start the Qshell environment. On the CL command line, run the STRQSH command.
    2. On the Qshell command line, run the following command using the dot (.) operator:
      . app_client_root/bin/setupClient [-profileName profileName]
      
  2. Compile your client application. Run the Java compilation command.
    [Windows]
    "%JAVA_HOME%\bin\javac" -classpath "%WAS_CLASSPATH%; 
    <list_of_your_application_jars_and_classes> " -extdirs %WAS_EXT_DIRS% 
    <your_application_class>.java
    [AIX] [Linux] [HP-UX] [Solaris] [z/OS]
    $JAVA_HOME/bin/javac -classpath "$WAS_CLASSPATH: 
    <list_of_your_application_jars_and_classes>" -extdirs $WAS_EXT_DIRS 
    <your_application_class>.java
    [i5/OS] Run the following command on the Qshell command line.
    javac -J-Djava.version=1.5 -classpath "$WAS_CLASSPATH:jars_and_classes" -extdirs $WAS_EXT_DIRS app_class.java
    • Run a Java command to invoke your client application.
      [Windows]
      "%JAVA_HOME%\bin\java" %WAS_LOGGING% -Djava.security.auth.login.config="%WAS_HOME%\properties\wsjaas_client.conf"
      -classpath "%WAS_CLASSPATH%;<list_of_your_application_jars_and_classes>" 
      -Djava.ext.dirs="%JAVA_JRE%\lib\ext;%WAS_EXT_DIRS%;%WAS_HOME%\plugins;%WAS_HOME%\lib\WMQ\java\lib" 
      -Djava.naming.provider.url=iiop://<your_application_server_machine_name> 
      -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory 
      "%SERVER_ROOT%" "%CLIENTSAS%" "%CLIENTSSL%" <fully_qualified_class_name_to_run>
      For information on IIOP and corbaloc URLs, see Developing applications that use JNDI.
      [AIX] [Linux] [HP-UX] [Solaris] [z/OS]
      $JAVA_HOME/bin/java $WAS_LOGGING 
      -classpath "$WAS_CLASSPATH: <list_of_your_application_jars_and_classes>" 
      -Djava.ext.dirs=$JAVA_JRE/lib/ext:$WAS_EXT_DIRS:$WAS_HOME/plugins:$WAS_HOME/lib/WMQ/java/lib"
      -Djava.naming.provider.url=iiop://<your_application_server_machine_name> 
      -Djava.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory 
      $SERVER_ROOT $CLIENTSAS $CLIENTSSL <fully_qualified_class_name_to_run>
      For information on IIOP and corbaloc URLs, see Developing applications that use JNDI.
      [i5/OS] Run the following command on the Qshell command line:
      java ${JAVA_FLAGS_EXT} -classpath "$WAS_CLASSPATH:jars_and_classes" -Djava.naming.provider.url=URL class_name app_parm
    • Launch the administrative program. The com.ibm.ws.admin.client_6.1.0.jar JAR file, which is in the WAS_HOME/runtimes directory and the com.ibm.ws.security.crypto.jar JAR file, which is in the WAS_HOME/plugins directory should be in your classpath. You can use java -classpath to have the JAR files in your classpath when launching your program.

Example

View the Samples gallery for more information about the Application Client.




In this information ...


Related concepts

IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/tcli_developthinclient.html