You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2004/09/24 15:24:10 UTC
cvs commit: ws-axis/c/tests/auto_build/testcases/platform/linux Makefile.am_client Makefile.am_server buildTestCase.sh setAxis.sh test.config
damitha 2004/09/24 06:24:10
Modified: c/tests/auto_build autoBuildCVS.sh
c/tests/auto_build/testcases/platform/linux buildTestCase.sh
setAxis.sh test.config
Added: c/tests/auto_build/testcases/server/cpp
ArrayTestPortType.cpp AxisBench.cpp Calculator.cpp
EnumerationWS.cpp ExtensibilityQueryPortType.cpp
Inquire.cpp InteropTestPortType.cpp
LargeReturningString.cpp ManyTypeRefRoot.cpp
MathOps.cpp operations.cpp RecurseTypesWS.cpp
RefTestPortType.cpp
SimpleTypeInnerUnboundedInOutputWS.cpp
SimpleTypeInnerUnboundedWS.cpp
c/tests/auto_build/testcases/platform/linux
Makefile.am_client Makefile.am_server
Log:
Work on supporting server side automated testing
Revision Changes Path
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/ArrayTestPortType.cpp
Index: ArrayTestPortType.cpp
===================================================================
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains definitions of the web service
*/
#include "ArrayTestPortType.h"
ArrayTestPortType::ArrayTestPortType()
{
}
ArrayTestPortType::~ArrayTestPortType()
{
}
/* This function is called by the AxisEngine when something went wrong
with the current web service request processing. Appropriate actions should
be taken here.*/
void ArrayTestPortType::onFault()
{
}
/* This function is called by the AxisEngine when this web service
library is first loaded. So here we can initialize any global/static
data structures of this web service or open database connections */
void ArrayTestPortType::init()
{
}
/* This function is called by the AxisEngine when this web service
library is unloaded. So we can deallocate any global/static data structures
and close database connections etc here. */
void ArrayTestPortType::fini()
{
}
intArrayType* ArrayTestPortType::echoIntArray(intArrayType* Value0)
{
return Value0;
}
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/AxisBench.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/Calculator.cpp
Index: Calculator.cpp
===================================================================
/*
*This is the Service implementation CPP file genarated by theWSDL2Ws.
* Calculator.cpp: implemtation for the Calculator.
*
*/
#include "Calculator.h"
Calculator::Calculator()
{
}
Calculator::~Calculator()
{
}
int Calculator::add(int Value0, int Value1)
{
return Value0+Value1;
}
int Calculator::sub(int Value0, int Value1)
{
return Value0-Value1;
}
int Calculator::mul(int Value0, int Value1)
{
return Value0*Value1;
}
int Calculator::div(int Value0, int Value1)
{
if (Value1 == 0) return -1; /* :)) */
return Value0/Value1;
}
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/EnumerationWS.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/ExtensibilityQueryPortType.cpp
Index: ExtensibilityQueryPortType.cpp
===================================================================
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains definitions of the web service
*/
#include "ExtensibilityQueryPortType.h"
ExtensibilityQueryPortType::ExtensibilityQueryPortType()
{
}
ExtensibilityQueryPortType::~ExtensibilityQueryPortType()
{
}
AnyType* ExtensibilityQueryPortType::query(AnyType* Value0)
{
return Value0;
}
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/Inquire.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/InteropTestPortType.cpp
Index: InteropTestPortType.cpp
===================================================================
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains definitions of the web service
*/
#include "InteropTestPortType.h"
InteropTestPortType::InteropTestPortType()
{
}
InteropTestPortType::~InteropTestPortType()
{
}
/* This function is called by the AxisEngine when something went wrong
with the current web service request processing. Appropriate actions should
be taken here.*/
void InteropTestPortType::onFault()
{
}
/* This function is called by the AxisEngine when this web service
library is first loaded. So here we can initialize any global/static
data structures of this web service or open database connections */
void InteropTestPortType::init()
{
}
/* This function is called by the AxisEngine when this web service
library is unloaded. So we can deallocate any global/static data structures
and close database connections etc here. */
void InteropTestPortType::fini()
{
}
xsd__string InteropTestPortType::echoString(xsd__string Value0)
{ return Value0;
}
xsd__string_Array InteropTestPortType::echoStringArray(xsd__string_Array Value0)
{ return Value0;
}
int InteropTestPortType::echoInteger(int Value0)
{ return Value0;
}
xsd__int_Array InteropTestPortType::echoIntegerArray(xsd__int_Array Value0)
{ return Value0;
}
float InteropTestPortType::echoFloat(float Value0)
{ return Value0;
}
xsd__float_Array InteropTestPortType::echoFloatArray(xsd__float_Array Value0)
{ return Value0;
}
SOAPStruct* InteropTestPortType::echoStruct(SOAPStruct* Value0)
{ return Value0;
}
SOAPStruct_Array InteropTestPortType::echoStructArray(SOAPStruct_Array Value0)
{ return Value0;
}
void InteropTestPortType::echoVoid()
{
}
xsd__base64Binary InteropTestPortType::echoBase64(xsd__base64Binary Value0)
{ return Value0;
}
xsd__dateTime InteropTestPortType::echoDate(xsd__dateTime Value0)
{ return Value0;
}
xsd__hexBinary InteropTestPortType::echoHexBinary(xsd__hexBinary Value0)
{ return Value0;
}
xsd__decimal InteropTestPortType::echoDecimal(xsd__decimal Value0)
{ return Value0;
}
xsd__boolean InteropTestPortType::echoBoolean(xsd__boolean Value0)
{ return Value0;
}
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/LargeReturningString.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/ManyTypeRefRoot.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/MathOps.cpp
Index: MathOps.cpp
===================================================================
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains definitions of the web service
*/
#include "MathOps.h"
MathOps::MathOps()
{
}
MathOps::~MathOps()
{
}
int MathOps::div(int Value0, int Value1)
{
if (Value1 == 0)
{
DivByZeroStruct* pObjFault = new DivByZeroStruct();
if(pObjFault)
{
pObjFault->varString = "Division by zero exception";
pObjFault->varInt = 1;
pObjFault->varFloat = 10.52;
throw pObjFault;
}
//throw AxisDivByZeroException();
}
if(Value0 < 0 || Value1 < 0)
{
OutOfBoundStruct* pObjFault = new OutOfBoundStruct();
SpecialDetailStruct* pObjSpecialDetailFault = new SpecialDetailStruct();
if(pObjSpecialDetailFault)
pObjSpecialDetailFault->varString = "This bound exception is a forced limitation";
if (pObjFault)
{
pObjFault->varString = "Value out of bound exception";
pObjFault->varInt = 2;
pObjFault->specialDetail = pObjSpecialDetailFault;
throw pObjFault;
}
}
if(Value0 == 1000)
{
SpecialDetailStruct* pObjFault = new SpecialDetailStruct();
if(pObjFault)
{
pObjFault->varString = strdup("You have entered 1000 for the 1st paramter. 1000 is reserved. Please do not use it");
throw pObjFault;
}
//throw AxisNormalDetailException();
}
return Value0/Value1;
}
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/operations.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/RecurseTypesWS.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/RefTestPortType.cpp
Index: RefTestPortType.cpp
===================================================================
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains definitions of the web service
*/
#include "RefTestPortType.h"
RefTestPortType::RefTestPortType()
{
}
RefTestPortType::~RefTestPortType()
{
}
/* This function is called by the AxisEngine when something went wrong
with the current web service request processing. Appropriate actions should
be taken here.*/
void RefTestPortType::onFault()
{
}
/* This function is called by the AxisEngine when this web service
library is first loaded. So here we can initialize any global/static
data structures of this web service or open database connections */
void RefTestPortType::init()
{
}
/* This function is called by the AxisEngine when this web service
library is unloaded. So we can deallocate any global/static data structures
and close database connections etc here. */
void RefTestPortType::fini()
{
}
intType* RefTestPortType::echoInt(intType* Value0)
{
return Value0;
}
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/SimpleTypeInnerUnboundedInOutputWS.cpp
<<Binary file>>
1.1 ws-axis/c/tests/auto_build/testcases/server/cpp/SimpleTypeInnerUnboundedWS.cpp
<<Binary file>>
1.16 +6 -3 ws-axis/c/tests/auto_build/autoBuildCVS.sh
Index: autoBuildCVS.sh
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/autoBuildCVS.sh,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- autoBuildCVS.sh 10 Sep 2004 04:26:34 -0000 1.15
+++ autoBuildCVS.sh 24 Sep 2004 13:24:10 -0000 1.16
@@ -102,11 +102,13 @@
cd ${HOME_DIR}
rm -f testcases/build/buildTestCase.log
rm -f testcases/build/runTestCase.log
-
+APACHE2_PORT=$(echo | grep APACHE2_PORT testcases/platform/linux/test.config | grep -o "[0-9]*$")
+APACHE_PORT=$(echo | grep APACHE_PORT testcases/platform/linux/test.config | grep -o "[0-9]*$")
# *** Deploy with Apache 2 ***
echo Start deploy with apache2 using expat parser library
sed 's/xercesc/expat/g' ${AXISCPP_DEPLOY}/bin/deploy_apache2.sh > ${AXISCPP_DEPLOY}/bin/deploy_apache2_auto.sh
-sed 's/9090/80/g' testcases/platform/linux/test.config > ./test.config
+grep port testcases/platform/linux/test.config | sed "s/[0-9]*$/${APACHE2_PORT}/g" > ./test.config
+#sed 's/9090/80/g' testcases/platform/linux/test.config > ./test.config
cp -f test.config testcases/platform/linux
cp -f ${AXISCPP_DEPLOY}/lib/libaxiscpp_mod2.so ${APACHE2_HOME}/modules/
sh ${AXISCPP_DEPLOY}/bin/deploy_apache2_auto.sh
@@ -128,7 +130,8 @@
echo "Start deploy with apache1 using expat parser library"
sed 's/xercesc/expat/g' ${AXISCPP_DEPLOY}/bin/deploy_apache.sh > ${AXISCPP_DEPLOY}/bin/deploy_apache_auto.sh
-sed 's/80/9090/g' ${HOME_DIR}/testcases/platform/linux/test.config > ./test.config
+grep port testcases/platform/linux/test.config | sed "s/[0-9]*$/${APACHE_PORT}/g" > ./test.config
+#sed 's/80/9090/g' ${HOME_DIR}/testcases/platform/linux/test.config > ./test.config
cp -f test.config ${HOME_DIR}/testcases/platform/linux
cp -f ${AXISCPP_DEPLOY}/lib/libaxiscpp_mod.so ${APACHE_HOME}/libexec/
sh ${AXISCPP_DEPLOY}/bin/deploy_apache_auto.sh
1.5 +38 -7 ws-axis/c/tests/auto_build/testcases/platform/linux/buildTestCase.sh
Index: buildTestCase.sh
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/platform/linux/buildTestCase.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- buildTestCase.sh 2 Sep 2004 06:44:15 -0000 1.4
+++ buildTestCase.sh 24 Sep 2004 13:24:10 -0000 1.5
@@ -7,17 +7,49 @@
#Build the wsdl2ws tool from the source
ant -lib ${AXIS_JARS_HOME} -buildfile ${AXISCPP_HOME}/src/wsdl/build.xml
-TARGET=$(echo $OUTPUT_DIR/$(basename $1 .wsdl).$2 | tr '+' 'p')
+
+#Server sample build and install
+TARGET_SERVER=$(echo $OUTPUT_DIR/$(basename $1 .wsdl).$2 | tr '+' 'p')_server
+SERVICE_FILE_NAME=$(echo | grep portType $1|grep -o '".*"'|sed "s/\"//g").$2
+echo ${SERVICE_FILE_NAME}
+SERVER=$(echo testcases/server/$2/${SERVICE_FILE_NAME})
+LIB_SERVICE_NAME=$(echo | grep portType $1|grep -o '".*"'|sed "s/\"//g")
+
+java -cp ${WSDL2WS_HOME}/wsdl2ws.jar:${AXIS_JARS} org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sserver -l$2 -o$TARGET_SERVER $1
+
+if [ $? -eq 0 ]
+then
+ cp $AXISCPP_TEST_BIN/configure.ac $AXISCPP_TEST_BIN/autogen.sh $TARGET_SERVER
+ cp $SERVER $TARGET_SERVER
+ cd $TARGET_SERVER
+ ALLSOURCES=$(ls $(echo "*.$2" | tr '+' 'p') | tr -d "^M")
+ printf "libservice_la_SOURCES = " > Makefile.am_temp
+ echo "$ALLSOURCES" | awk '{printf" %s", $1}' >> Makefile.am_temp
+ echo " " >> Makefile.am_temp
+ cat $AXISCPP_TEST_BIN/Makefile.am_server >> Makefile.am_temp
+ sed "s/service/${LIB_SERVICE_NAME}/g" Makefile.am_temp > Makefile.am
+ ./autogen.sh
+ ./configure --prefix=${AXISCPP_DEPLOY}
+ make install
+ ${APACHE2_HOME}/bin/apachectl restart
+ ${APACHE_HOME}/bin/apachectl restart
+else
+ echo "WSDL2Ws.sh -sserver -l$2 -o$TARGET_SERVER $1 failed"
+ exit 1
+fi
+
+#Client sample build
+TARGET_CLIENT=$(echo $OUTPUT_DIR/$(basename $1 .wsdl).$2 | tr '+' 'p')_client
CLIENT=$(echo testcases/client/$2/$(basename $1 .wsdl)Client.$2 | tr '+' 'p')
-java -cp ${WSDL2WS_HOME}/wsdl2ws.jar:${AXIS_JARS} org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -l$2 -o$TARGET $1
+java -cp ${WSDL2WS_HOME}/wsdl2ws.jar:${AXIS_JARS} org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -l$2 -o$TARGET_CLIENT $1
if [ $? -eq 0 ]
then
- cp $AXISCPP_TEST_BIN/configure.ac $AXISCPP_TEST_BIN/autogen.sh $TARGET
- cp $CLIENT $TARGET
- cd $TARGET
+ cp $AXISCPP_TEST_BIN/configure.ac $AXISCPP_TEST_BIN/autogen.sh $TARGET_CLIENT
+ cp $CLIENT $TARGET_CLIENT
+ cd $TARGET_CLIENT
ALLSOURCES=$(ls $(echo "*.$2" | tr '+' 'p') | tr -d "
")
printf "client_SOURCES = " > Makefile.am
echo "$ALLSOURCES" | awk '{printf" %s", $1}' >> Makefile.am
@@ -27,9 +59,8 @@
./configure
make
else
- echo "WSDL2Ws.sh -sclient -l$2 -o$TARGET $1 failed"
+ echo "WSDL2Ws.sh -sclient -l$2 -o$TARGET_CLIENT $1 failed"
exit 1
fi
-
exit 0
1.6 +3 -1 ws-axis/c/tests/auto_build/testcases/platform/linux/setAxis.sh
Index: setAxis.sh
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/platform/linux/setAxis.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- setAxis.sh 7 Sep 2004 07:44:16 -0000 1.5
+++ setAxis.sh 24 Sep 2004 13:24:10 -0000 1.6
@@ -22,6 +22,8 @@
AXISCPP_HOME=${AXISCPP_HOME:-/home/damitha/projects/cvshead/tests/auto_build/cvsautobuild}
AXISCPP_DEPLOY=${AXISCPP_DEPLOY:-/usr/local/axicpp_deploy}
WSDLSRC_HOME="${AXISCPP_HOME}/src/wsdl"
+APACHE2_HOME=${APACHE2_HOME:-/usr/local/apache2}
+APACHE_HOME=${APACHE_HOME:-/usr/local/apache}
set +x
#
# These variables are based upon the variables above, but rely on a standard
@@ -59,7 +61,7 @@
#export PATH JAVA_HOME CLASSPATH LD_LIBRARY_PATH
# export variables that will be used by other scripts
-export AXISCPP_HOME AXISCPP_DEPLOY AXISCPP_HOME_BIN AXISCPP_HOME_INCL AXISCPP_TEST_BIN OUTPUT_DIR SERVICE_CONFIG WSDL2WS_HOME AXIS_JARS_HOME AXIS_JARS PATH JAVA_HOME CLASSPATH LD_LIBRARY_PATH WSDLSRC_HOME
+export APACHE2_HOME APACHE_HOME AXISCPP_HOME AXISCPP_DEPLOY AXISCPP_HOME_BIN AXISCPP_HOME_INCL AXISCPP_TEST_BIN OUTPUT_DIR SERVICE_CONFIG WSDL2WS_HOME AXIS_JARS_HOME AXIS_JARS PATH JAVA_HOME CLASSPATH LD_LIBRARY_PATH WSDLSRC_HOME
# The End
1.5 +33 -72 ws-axis/c/tests/auto_build/testcases/platform/linux/test.config
Index: test.config
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/platform/linux/test.config,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- test.config 9 Sep 2004 06:31:53 -0000 1.4
+++ test.config 24 Sep 2004 13:24:10 -0000 1.5
@@ -1,74 +1,35 @@
-#
-# This config file allows the test to run pointing at a different
# server and/or port. If your wsdl's service is running on a different
# machine and port change the default values for service and port,
-# which is currently localhost and 9090 respectively.
-# This file is grep'd for the values so dont put extra stuff on the end of the lines
-#
-
-SimpleArray:host=localhost
-SimpleArray:port=9090
-SimpleRef:host=localhost
-SimpleRef:port=9090
-AxisBench:host=localhost
-AxisBench:port=9090
-Calculator:host=localhost
-Calculator:port=9090
-ComplexTypeAll:host=localhost
-ComplexTypeAll:port=9090
-Enumeration:host=localhost
-Enumeration:port=9090
-ExceptionTest:host=localhost
-ExceptionTest:port=9090
-ExtensibilityQuery:host=localhost
-ExtensibilityQuery:port=9090
-FaultMapping:host=localhost
-FaultMapping:port=9090
-inquire_v2:host=www-3.ibm.com
-inquire_v2:port=9090
-InteropTestRound1:host=localhost
-InteropTestRound1:port=9090
-LargeReturningString:host=localhost
-LargeReturningString:port=9090
-ManyTypeRefRoot:host=localhost
-ManyTypeRefRoot:port=9090
-MathOps:host=localhost
-MathOps:port=9090
-RecurseTypes:host=localhost
-RecurseTypes:port=9090
-RpcHttpHeaderTest1:host=localhost
-RpcHttpHeaderTest1:port=9090
-RpcHttpHeaderTest2:host=localhost
-RpcHttpHeaderTest2:port=9090
-RpcHttpHeaderTest3:host=localhost
-RpcHttpHeaderTest3:port=9090
-RpcHttpHeaderTest4:host=localhost
-RpcHttpHeaderTest4:port=9090
-RpcHttpHeaderTest5:host=localhost
-RpcHttpHeaderTest5:port=9090
-RpcHttpHeaderTest7:host=localhost
-RpcHttpHeaderTest7:port=9090
-RpcHttpHeaderTest8:host=localhost
-RpcHttpHeaderTest8:port=9090
-RpcSoapHeaderTest10:host=localhost
-RpcSoapHeaderTest10:port=9090
-RpcSoapHeaderTest1:host=localhost
-RpcSoapHeaderTest1:port=9090
-RpcSoapHeaderTest2:host=localhost
-RpcSoapHeaderTest2:port=9090
-RpcSoapHeaderTest3:host=localhost
-RpcSoapHeaderTest3:port=9090
-RpcSoapHeaderTest4:host=localhost
-RpcSoapHeaderTest4:port=9090
-RpcSoapHeaderTest6:host=localhost
-RpcSoapHeaderTest6:port=9090
-RpcSoapHeaderTest8:host=localhost
-RpcSoapHeaderTest8:port=9090
-RpcSoapHeaderTest9:host=localhost
-RpcSoapHeaderTest9:port=9090
-SimpleTypeArray:host=localhost
-SimpleTypeArray:port=9090
-SimpleTypeInnerUnboundedInOutput:host=localhost
-SimpleTypeInnerUnboundedInOutput:port=9090
-SimpleTypeInnerUnbounded:host=localhost
-SimpleTypeInnerUnbounded:port=9090
+SimpleArray:port=
+SimpleRef:port=
+AxisBench:port=
+Calculator:port=
+ComplexTypeAll:port=
+Enumeration:port=
+ExceptionTest:port=
+ExtensibilityQuery:port=
+FaultMapping:port=
+inquire_v2:port=
+InteropTestRound1:port=
+LargeReturningString:port=
+ManyTypeRefRoot:port=
+MathOps:port=
+RecurseTypes:port=
+RpcHttpHeaderTest1:port=
+RpcHttpHeaderTest2:port=
+RpcHttpHeaderTest3:port=
+RpcHttpHeaderTest4:port=
+RpcHttpHeaderTest5:port=
+RpcHttpHeaderTest7:port=
+RpcHttpHeaderTest8:port=
+RpcSoapHeaderTest10:port=
+RpcSoapHeaderTest1:port=
+RpcSoapHeaderTest2:port=
+RpcSoapHeaderTest3:port=
+RpcSoapHeaderTest4:port=
+RpcSoapHeaderTest6:port=
+RpcSoapHeaderTest8:port=
+RpcSoapHeaderTest9:port=
+SimpleTypeArray:port=
+SimpleTypeInnerUnboundedInOutput:port=
+SimpleTypeInnerUnbounded:port=
1.1 ws-axis/c/tests/auto_build/testcases/platform/linux/Makefile.am_client
Index: Makefile.am_client
===================================================================
bin_PROGRAMS = client
SUBDIRS =
AM_CPPFLAGS = -pedantic
client_LDADD = -L${AXISCPP_DEPLOY}/lib -laxiscpp_client -ldl
INCLUDES = -I$(AXISCPP_HOME_INCL)
1.1 ws-axis/c/tests/auto_build/testcases/platform/linux/Makefile.am_server
Index: Makefile.am_server
===================================================================
lib_LTLIBRARIES = libservice.la
libservice_la_LIBADD = $(LDFLAGS)
INCLUDES = -I$(AXISCPP_HOME)/include