You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@yahoo.com> on 2004/10/06 04:46:03 UTC

Pointer initilization

Hi All,
   In the generated code (by WSDL2WS) as well as in the Axis C++ engine code we have pointer
inited using 0. Would'nt the code be more readable if we used NULL instead to init pointers?

Thanks,
Samisa...


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

Re: Using automake tools in test scripts

Posted by damitha kumarage <da...@opensource.lk>.
Hi Samisa,

This is very good. We need to eleminate the first reason as well
I'll apply this now
thanks
damitha
On Wed, 2004-10-06 at 11:50, Samisa Abeysinghe wrote:
> Hi Damitha,
>     When I tried to run the latest test acripts from CVS I found that they were running quite
> slow.
> 
> There are two reasons for this:
> 1. Build script builds the WSDL2Ws tool for each run.
> 2. Build script (tests/auto_build/testcases/platform/linux/buildTestCase.sh) uses auto make tool
> to generate a Makefile for compiling the source:
> 
> We could eliminate the need for make tools very simply by using g++ directly in
> tests/auto_build/testcases/platform/linux/buildTestCase.sh. This saves lots of time. I have done
> this and attached the diff.
> 
> Please have a look and patch the file if this makes sense.
> 
> Thanks,
> Samisa...
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> ______________________________________________________________________
> 
> --- testcases/platform/linux/buildTestCase.sh.bak	2004-10-06 10:58:35.783094360 +0000
> +++ testcases/platform/linux/buildTestCase.sh	2004-10-06 11:45:54.002619408 +0000
> @@ -7,29 +7,20 @@
>  
>  #Build the wsdl2ws tool from the source
>  #ant -lib ${AXIS_JARS_HOME} -buildfile ${AXISCPP_HOME}/src/wsdl/build.xml
> +
>  #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})
> +SERVER=$(echo testcases/server/$2/$(basename $1 .wsdl).$2 | tr '+' 'p')
>  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
> +  g++ -shared -I$AXISCPP_HOME/include -olibservice.la *.cpp
>    ${APACHE2_HOME}/bin/apachectl restart
>    ${APACHE_HOME}/bin/apachectl restart
>  else
> @@ -47,17 +38,9 @@
>  if [ $? -eq 0 ]
>  then
>  
> -  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
> -  echo " " >> Makefile.am
> -  cat $AXISCPP_TEST_BIN/Makefile.am >> Makefile.am
> -  ./autogen.sh
> -  ./configure
> -  make
> +  g++ -I$AXISCPP_HOME/include -L$AXISCPP_DEPLOY/lib -laxiscpp_client -ldl -oclient *.cpp
>  else
>    echo "WSDL2Ws.sh -sclient -l$2 -o$TARGET_CLIENT $1 failed"
>    exit 1


Using automake tools in test scripts

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Hi Damitha,
    When I tried to run the latest test acripts from CVS I found that they were running quite
slow.

There are two reasons for this:
1. Build script builds the WSDL2Ws tool for each run.
2. Build script (tests/auto_build/testcases/platform/linux/buildTestCase.sh) uses auto make tool
to generate a Makefile for compiling the source:

We could eliminate the need for make tools very simply by using g++ directly in
tests/auto_build/testcases/platform/linux/buildTestCase.sh. This saves lots of time. I have done
this and attached the diff.

Please have a look and patch the file if this makes sense.

Thanks,
Samisa...


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

Re: Pointer initilization

Posted by John Hawkins <HA...@uk.ibm.com>.



+1

John Hawkins




                                                                           
             Samisa Abeysinghe                                             
             <samisa_abeysingh                                             
             e@yahoo.com>                                               To 
                                       Apache AXIS C Developers List       
             06/10/2004 03:46          <ax...@ws.apache.org>          
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           Pointer initilization               
             Developers List"                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi All,
   In the generated code (by WSDL2WS) as well as in the Axis C++ engine
code we have pointer
inited using 0. Would'nt the code be more readable if we used NULL instead
to init pointers?

Thanks,
Samisa...



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail