Author: saminda Date: Mon Jan 7 05:25:17 2008 New Revision: 11965 Log:
1. Added run-client.bat for Jibx sample 2. Added README to Jibx sample Added: trunk/wsas/java/modules/samples/Jibx/README trunk/wsas/java/modules/samples/Jibx/run-client.bat Added: trunk/wsas/java/modules/samples/Jibx/README ============================================================================== --- (empty file) +++ trunk/wsas/java/modules/samples/Jibx/README Mon Jan 7 05:25:17 2008 @@ -0,0 +1,40 @@ +Sample: Jibx +============ + +Introduction +============ + +This sample demonstrate a usage of Jibx data binding that comes with Axis2. JiBX differs from the +other data binding techniques supported by Axis2 in that it allows you to use your own Java data +objects (as opposed to Java data objects generated from a schema definition). JiBX also provides a +nicer form of unwrapped Web services interface than is supported by the other data binding techniques. + On the downside, JiBX requires more setup than the other data binding techniques - in particular, you + need to come up with a set of data classes and a binding definition in order to work with JiBX in Axis2. + +Building the Service +==================== + +To build the sample service, go to samples directory and type: "ant" + +This will build LibraryService.aar in the target directory and copy it to the +<WSAS_HOME>/repository/services directory. + +The WSDL for this service should be viewable at: + +http://<host>:<port>/services/LibraryService?wsdl + + +Running the Client +================== + +To run the sample client for the service, go to samples directory and user either run-client.sh in Linux or +run-client.bat in Windows. + +Or else you can use WSAS features to generate the client stubs pointing to the wsdl and invoke the service with that +Or invoke the service with Try-It + +Help +==== +Please contact wsas java user list ([EMAIL PROTECTED]), if you have any trouble running the sample. + + Added: trunk/wsas/java/modules/samples/Jibx/run-client.bat ============================================================================== --- (empty file) +++ trunk/wsas/java/modules/samples/Jibx/run-client.bat Mon Jan 7 05:25:17 2008 @@ -0,0 +1,81 @@ [EMAIL PROTECTED] off +REM --------------------------------------------------------------------------- +REM Copyright 2005,2006 WSO2, Inc. http://www.wso2.org +REM +REM Licensed under the Apache License, Version 2.0 (the "License"); +REM you may not use this file except in compliance with the License. +REM You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +rem --------------------------------------------------------------------------- +rem Client script for the CommodityQuote Sample +rem +rem Environment Variable Prequisites +rem +rem WSO2WSAS_HOME Must point at your WSO2 WSAS directory +rem +rem JAVA_HOME Must point at your Java Development Kit installation. +rem +rem JAVA_OPTS (Optional) Java runtime options +rem --------------------------------------------------------------------------- +set CURRENT_DIR=%cd% + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto gotJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto end +:gotJavaHome +if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome +goto okJavaHome +:noJavaHome +echo The JAVA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +echo NB: JAVA_HOME should point to a JDK/JRE +goto end +:okJavaHome + +rem check the WSO2WSAS_HOME environment variable +if not "%WSO2WSAS_HOME%" == "" goto gotHome +set WSO2WSAS_HOME=%CURRENT_DIR% +if exist "%WSO2WSAS_HOME\bin\version.txt" goto okHome + +rem guess the home. Jump two directories up to check if that is the home +cd ..\.. +set WSO2WSAS_HOME=%cd% +cd %CURRENT_DIR% + +:gotHome +if exist "%WSO2WSAS_HOME%\bin\version.txt" goto okHome + +set WSO2WSAS_HOME=%~dp0..\.. +if exist "%WSO2WSAS_HOME%\bin\version.txt" goto okHome + +echo The WSO2WSAS_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end + +:okHome +rem set the classes +setlocal EnableDelayedExpansion +rem loop through the libs and add them to the class path +cd %WSO2WSAS_HOME%\samples\Jibx +set CLIENT_CLASSPATH=.\conf;.\temp\classes +FOR %%C in (..\..\lib\*.jar) DO set CLIENT_CLASSPATH=!CLIENT_CLASSPATH!;..\..\lib\%%~nC%%~xC + +rem ----- Execute The Requested Command --------------------------------------- +echo Using WSO2WSAS_HOME: %WSO2WSAS_HOME% +echo Using JAVA_HOME: %JAVA_HOME% +set _RUNJAVA="%JAVA_HOME%\bin\java" + +%_RUNJAVA% %JAVA_OPTS% -Dwso2wsas.home="%WSO2WSAS_HOME%" -cp "%CLIENT_CLASSPATH%" -Djava.endorsed.dirs="%WSO2WSAS_HOME%\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" org.wso2.wsas.jibx.Client %* +cd %CURRENT_DIR% +endlocal +:end _______________________________________________ Wsas-java-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev
