@echo off
@REM you need to set 2 env variables : AXIS2_HOME and JAVAHOME, or modify the 2 values here

set SAMPLEDIR=.

if NOT DEFINED AXIS2_HOME (
   echo AXIS2_HOME not defined. Must be defined to run java apps.
   goto END
)

if NOT DEFINED JAVAHOME (
   echo JAVAHOME not defined. Must be defined to run java apps.
   goto END
)

setlocal

:SETENV
set PATH=%JAVAHOME%\bin;%AXIS2_HOME%\bin;%PATH%
set LOCALCLASSPATH=%CD%
for %%f in (%AXIS2_HOME%\lib\*.jar) do (call set LOCALCLASSPATH=%%LOCALCLASSPATH%%;%%f)

for %%i in ("lib\*.jar") do call lcp.bat %CD%\%%i
set LOCALCLASSPATH=%LOCALCLASSPATH%;%CLASSPATH%

:next
if [%1]==[] goto argend
   set ARG=%ARG% %1
   shift
   goto next
:argend

:DORUN
pushd ..\..
"%JAVAHOME%"\bin\java -cp "%LOCALCLASSPATH%" -Xmx1024M %ARG%
popd

endlocal

:END
echo Done.
