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 Adrian Dick <ad...@uk.ibm.com> on 2004/09/06 18:38:18 UTC

ANT scripts for building Axis C client




Hi Guys,


I understand you require an ANT based build for automated nightly builds
within GUMP.

I have just checked in an ANT script I have been using for compiling the
Axis C client, transport and XML parser libraries.  We have used this
regularly for the past month on Windows, Linux (RH AS 3.0) and AIX.
In addition, I have also checked in an ANT script to generate, compile, run
and verify the automated client tests.   I have been experiencing
difficulties with this script on linux, but am still investigating if this
is in the script or code.

I have included the following basic documentation within the ant scripts
(can be viewed by typing ant -projecthelp).   It is my intention to update
the web pages to describe more fully how to use these scripts.
This script is intended for use with Java 1.4+ and Apache ANT 1.6+.
Ant is available from: http://ant.apache.org/

To compile C/C++ code you will require the cpptasks extension to ANT,
within:
      [ant install dir]/lib
This is available from: http://ant-contrib.sourceforge.net/
{Note: you will require the cpptasks download, not ant-contrib}

It is intended that the default target be used, which compiles and links
all code,
generates documentation and packages ready for distribution.

Associated with this build script are property files for each platform, the
script
will automatically determine the correct one to be used;
      - build.Win32.properties
      - build.Linux.properties
      - build.AIX.properties
Please use these to configure directories to suit the needs of your system.

Notes:
* The documentation target requires doxygen be installed and available on
the system path
  This is available from: http://www.doxygen.org
* The following compilers will be required;
      - Windows = Microsoft Visual C++ 6.0
      - Linux   = gcc
      - AIX     = Visual Age




I shall look into compiling the server and samples over the coming days.
If you have any problems, please let me know.

Regards,
Adrian

_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


Re: WSDL2Ws verbose mode

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
commons-logging has not been investigated.
It is good if we could integrate this.

Samisa...

--- John Hawkins <HA...@uk.ibm.com> wrote:

> 
> 
> 
> 
> It Would be better if we used commons-logging for the trace msgs  (as do
> wsdl2java?)- has this ever been investigated?
> 
> John Hawkins
> 
> 
> 
> 
>                                                                            
>              Samisa Abeysinghe                                             
>              <samisa_abeysingh                                             
>              e@yahoo.com>                                               To 
>                                        Apache AXIS C Developers List       
>              08/09/2004 08:40          <ax...@ws.apache.org>          
>                                                                         cc 
>                                                                            
>              Please respond to                                     Subject 
>               "Apache AXIS C           WSDL2Ws verbose mode                
>              Developers List"                                              
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> Hi All,
>    Now the WSDL2Ws tool has a verbose option.
> 
>    In the future, when you are adding new features to WSDL2Ws tool, if you
> want to add debug
> system outs or informative system outs please make sure that you test for
> verbose mode.
> 
> e.g.
>     if (WSDL2Ws.verbose)
>         System.out.println( "Message" );
> 
> For this you may need to
> import org.apache.axis.wsdl.wsdl2ws.WSDL2Ws;
> 
> Thanks,
> Samisa...
> 
> 
> 
> 
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> 
> 
> 



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

Re: WSDL2Ws verbose mode

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



It Would be better if we used commons-logging for the trace msgs  (as do
wsdl2java?)- has this ever been investigated?

John Hawkins




                                                                           
             Samisa Abeysinghe                                             
             <samisa_abeysingh                                             
             e@yahoo.com>                                               To 
                                       Apache AXIS C Developers List       
             08/09/2004 08:40          <ax...@ws.apache.org>          
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           WSDL2Ws verbose mode                
             Developers List"                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi All,
   Now the WSDL2Ws tool has a verbose option.

   In the future, when you are adding new features to WSDL2Ws tool, if you
want to add debug
system outs or informative system outs please make sure that you test for
verbose mode.

e.g.
    if (WSDL2Ws.verbose)
        System.out.println( "Message" );

For this you may need to
import org.apache.axis.wsdl.wsdl2ws.WSDL2Ws;

Thanks,
Samisa...




_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush



WSDL2Ws verbose mode

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Hi All,
   Now the WSDL2Ws tool has a verbose option.

   In the future, when you are adding new features to WSDL2Ws tool, if you want to add debug
system outs or informative system outs please make sure that you test for verbose mode.

e.g.
    if (WSDL2Ws.verbose)
        System.out.println( "Message" );

For this you may need to
import org.apache.axis.wsdl.wsdl2ws.WSDL2Ws;

Thanks,
Samisa...



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

RE: Few questions on values returned to Stubs

Posted by Susantha Kumara <su...@opensource.lk>.
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> Sent: Tuesday, September 07, 2004 9:54 AM
> To: Apache AXIS C Developers List
> Subject: Few questions on values returned to Stubs
> 
> Hi All,
>    I have few doubts to clarify regarding the values reurned by the
> generated code.
> 
>    I will use the 'base' sample to explain my questions.
> 
> 1. The generated code has a method with signature:
>     SOAPStruct* echoStruct(SOAPStruct* Value0);
> SOAPStruct here is a class. My question is that will the generated
code
> always return a pointer in
> case of returning class objects. In other words, is it possible to
return
> an object by value from
> a method call?

This is the convention used in the generated code by WSDL2Ws tool. All
complex types are passed/returned by reference(pointers) and basic types
and Arrays are passed/returned by value. 

These conventions are documented in CAXRPC (C API for XML RPC) draft
which is incomplete yet.

> 
> 2. The SOAPStruct class has a member with the signature:
>     xsd__string varString;
> Here xsd__string is basically char* and destructor uses malloc to
allocate
> memory for this member.
> However destructor of SOAPStruct class does not release the varString
> member.
> Hence in the user written code, I have to release the varString member
> explicitly.
> e.g.
>     SOAPStruct* stctResult = ws.echoStruct (&stct);
>     // Do stuff
>     // clean memory
>     free(stctResult->varString);
> Can we update the code generation tool to clean up char* members from
> class destructor? Is there
> any specific reason not to do this?

No you can safely add Clean up code generation. Please remove the line "
/*delete any pointer and array members here*/ " when you have done the
clean up code generation.

> 
> 3. As I mentioned in an earlier email, in case of arrays, the
generated
> code use stucts
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
>         SOAPStruct* m_Array;
>         int m_Size;
> } SOAPStruct_Array;
> 
> Arrays are returned by value.
> e.g.
>     SOAPStruct_Array echoStructArray(SOAPStruct_Array Value0);
>   3.1 In case of array structs, do we always retun by value? 

Yes.

> In other
> words, is it possible that
> the generated code return a pointer to an array struct? Also why are
we
> not returning a pointer in
> case of array struct?

This is convention (design decision) because
	- If we return a pointer we have to manage the memory
allocation/deallocation for the Array struct too. By adhering to this
convention we can avoid that.

> 
>   3.2 In this case I have to use the assignment operator to hold the
> return value
> e.g.
>     SOAPStruct_Array arrstctResult = ws.echoStructArray (arrstct);
>       Is this syntax correct?

Yes. Usually when you assign a struct to another instance all its
members are copied. But I am not sure whether there are compilers that
do not do this.
 
> 
>   3.3 When I look in the generated code for echo array of struct I see
the
> following:
>       RetArray = (SOAPStruct_Array&)m_pCall->getCmplxArray((void*)
> Axis_DeSerialize_SOAPStruct, (v
> oid*) Axis_Create_SOAPStruct, (void*) Axis_Delete_SOAPStruct, (void*)
> Axis_GetSize_SOAPStruct,
> "return", Axis_URI_SOAPStruct
> );
>       Here the getCmplxArray method of Call class returns an
Axis_Array
> struct. And we cast the
> result to SOAPStruct_Array. (Note that they are structs and not
classes.
> Hence there is no
> inheritance here) How correct is this cast (casting one struct type to
> another)? It may work but
> it looks like therer is something wrong. Or am I missing something
here?

What we do here is just copying the struct returned by getComplexArray
to RetArray. This is like using memcpy because we know for sure that
memory layout of Axis_Array and SOAPStruct_Array is the same. So this
casting is just to say the compiler to treat the returned Axis_Array as
a SOAPStruct_Array.
 
> 
> Your help on this is highly appreciated.
> Thanks,
> Samisa...
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail


Few questions on values returned to Stubs

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Hi All,
   I have few doubts to clarify regarding the values reurned by the generated code.

   I will use the 'base' sample to explain my questions.

1. The generated code has a method with signature:
    SOAPStruct* echoStruct(SOAPStruct* Value0);
SOAPStruct here is a class. My question is that will the generated code always return a pointer in
case of returning class objects. In other words, is it possible to return an object by value from
a method call?

2. The SOAPStruct class has a member with the signature:
    xsd__string varString;
Here xsd__string is basically char* and destructor uses malloc to allocate memory for this member.
However destructor of SOAPStruct class does not release the varString member.
Hence in the user written code, I have to release the varString member explicitly.
e.g.
    SOAPStruct* stctResult = ws.echoStruct (&stct);
    // Do stuff
    // clean memory
    free(stctResult->varString);
Can we update the code generation tool to clean up char* members from class destructor? Is there
any specific reason not to do this?

3. As I mentioned in an earlier email, in case of arrays, the generated code use stucts
e.g.
typedef struct SOAPStruct_ArrayTag
{
        SOAPStruct* m_Array;
        int m_Size;
} SOAPStruct_Array;

Arrays are returned by value.
e.g.
    SOAPStruct_Array echoStructArray(SOAPStruct_Array Value0);
  3.1 In case of array structs, do we always retun by value? In other words, is it possible that
the generated code return a pointer to an array struct? Also why are we not returning a pointer in
case of array struct?

  3.2 In this case I have to use the assignment operator to hold the return value
e.g. 
    SOAPStruct_Array arrstctResult = ws.echoStructArray (arrstct);
      Is this syntax correct? 

  3.3 When I look in the generated code for echo array of struct I see the following:
      RetArray = (SOAPStruct_Array&)m_pCall->getCmplxArray((void*) Axis_DeSerialize_SOAPStruct, (v
oid*) Axis_Create_SOAPStruct, (void*) Axis_Delete_SOAPStruct, (void*) Axis_GetSize_SOAPStruct,
"return", Axis_URI_SOAPStruct
);
      Here the getCmplxArray method of Call class returns an Axis_Array struct. And we cast the
result to SOAPStruct_Array. (Note that they are structs and not classes. Hence there is no
inheritance here) How correct is this cast (casting one struct type to another)? It may work but
it looks like therer is something wrong. Or am I missing something here?

Your help on this is highly appreciated.
Thanks,
Samisa...



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

Re: ANT scripts for building Axis C client

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



+1 for seperate doc - but with links (obviously!) off the main build page.

John Hawkins




                                                                           
             Samisa Abeysinghe                                             
             <samisa_abeysingh                                             
             e@yahoo.com>                                               To 
                                       Apache AXIS C Developers List       
             07/09/2004 03:52          <ax...@ws.apache.org>          
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           Re: ANT scripts for building Axis C 
             Developers List"          client                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi Adrian,
    Thank you for the effort on ant script.
> It is my intention to update
> the web pages to describe more fully how to use these scripts.

+1.
I think it is better to have a seperate html doc on ant based build,
rhather than integrating doc
on ant procedures with existing installation gude.

Thanks,
Samisa...

--- John Hawkins <HA...@uk.ibm.com> wrote:

>
>
>
>
> Does this mean we can get a Gump build now - or is there anything else we
> can do to help
>
> John Hawkins
>
>
>
>
>

>              Adrian

>              Dick/UK/IBM@IBMGB

>
To
>              06/09/2004 17:38          axis-c-dev@ws.apache.org

>
cc
>

>              Please respond to
Subject
>               "Apache AXIS C           ANT scripts for building Axis C

>              Developers List"          client

>

>

>

>

>

>

>
>
>
>
>
>
>
>
> Hi Guys,
>
>
> I understand you require an ANT based build for automated nightly builds
> within GUMP.
>
> I have just checked in an ANT script I have been using for compiling the
> Axis C client, transport and XML parser libraries.  We have used this
> regularly for the past month on Windows, Linux (RH AS 3.0) and AIX.
> In addition, I have also checked in an ANT script to generate, compile,
run
> and verify the automated client tests.   I have been experiencing
> difficulties with this script on linux, but am still investigating if
this
> is in the script or code.
>
> I have included the following basic documentation within the ant scripts
> (can be viewed by typing ant -projecthelp).   It is my intention to
update
> the web pages to describe more fully how to use these scripts.
> This script is intended for use with Java 1.4+ and Apache ANT 1.6+.
> Ant is available from: http://ant.apache.org/
>
> To compile C/C++ code you will require the cpptasks extension to ANT,
> within:
>       [ant install dir]/lib
> This is available from: http://ant-contrib.sourceforge.net/
> {Note: you will require the cpptasks download, not ant-contrib}
>
> It is intended that the default target be used, which compiles and links
> all code,
> generates documentation and packages ready for distribution.
>
> Associated with this build script are property files for each platform,
the
> script
> will automatically determine the correct one to be used;
>       - build.Win32.properties
>       - build.Linux.properties
>       - build.AIX.properties
> Please use these to configure directories to suit the needs of your
system.
>
> Notes:
> * The documentation target requires doxygen be installed and available on
> the system path
>   This is available from: http://www.doxygen.org
> * The following compilers will be required;
>       - Windows = Microsoft Visual C++ 6.0
>       - Linux   = gcc
>       - AIX     = Visual Age
>
>
>
>
> I shall look into compiling the server and samples over the coming days.
> If you have any problems, please let me know.
>
> Regards,
> Adrian
>
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
>
>
>
>




__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail



Re: ANT scripts for building Axis C client

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Hi Adrian,
    Thank you for the effort on ant script.
> It is my intention to update
> the web pages to describe more fully how to use these scripts.

+1.
I think it is better to have a seperate html doc on ant based build, rhather than integrating doc
on ant procedures with existing installation gude.

Thanks,
Samisa...

--- John Hawkins <HA...@uk.ibm.com> wrote:

> 
> 
> 
> 
> Does this mean we can get a Gump build now - or is there anything else we
> can do to help
> 
> John Hawkins
> 
> 
> 
> 
>                                                                            
>              Adrian                                                        
>              Dick/UK/IBM@IBMGB                                             
>                                                                         To 
>              06/09/2004 17:38          axis-c-dev@ws.apache.org            
>                                                                         cc 
>                                                                            
>              Please respond to                                     Subject 
>               "Apache AXIS C           ANT scripts for building Axis C     
>              Developers List"          client                              
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> 
> 
> 
> 
> Hi Guys,
> 
> 
> I understand you require an ANT based build for automated nightly builds
> within GUMP.
> 
> I have just checked in an ANT script I have been using for compiling the
> Axis C client, transport and XML parser libraries.  We have used this
> regularly for the past month on Windows, Linux (RH AS 3.0) and AIX.
> In addition, I have also checked in an ANT script to generate, compile, run
> and verify the automated client tests.   I have been experiencing
> difficulties with this script on linux, but am still investigating if this
> is in the script or code.
> 
> I have included the following basic documentation within the ant scripts
> (can be viewed by typing ant -projecthelp).   It is my intention to update
> the web pages to describe more fully how to use these scripts.
> This script is intended for use with Java 1.4+ and Apache ANT 1.6+.
> Ant is available from: http://ant.apache.org/
> 
> To compile C/C++ code you will require the cpptasks extension to ANT,
> within:
>       [ant install dir]/lib
> This is available from: http://ant-contrib.sourceforge.net/
> {Note: you will require the cpptasks download, not ant-contrib}
> 
> It is intended that the default target be used, which compiles and links
> all code,
> generates documentation and packages ready for distribution.
> 
> Associated with this build script are property files for each platform, the
> script
> will automatically determine the correct one to be used;
>       - build.Win32.properties
>       - build.Linux.properties
>       - build.AIX.properties
> Please use these to configure directories to suit the needs of your system.
> 
> Notes:
> * The documentation target requires doxygen be installed and available on
> the system path
>   This is available from: http://www.doxygen.org
> * The following compilers will be required;
>       - Windows = Microsoft Visual C++ 6.0
>       - Linux   = gcc
>       - AIX     = Visual Age
> 
> 
> 
> 
> I shall look into compiling the server and samples over the coming days.
> If you have any problems, please let me know.
> 
> Regards,
> Adrian
> 
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)
> 
> 
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

Re: ANT scripts for building Axis C client

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



Does this mean we can get a Gump build now - or is there anything else we
can do to help

John Hawkins




                                                                           
             Adrian                                                        
             Dick/UK/IBM@IBMGB                                             
                                                                        To 
             06/09/2004 17:38          axis-c-dev@ws.apache.org            
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           ANT scripts for building Axis C     
             Developers List"          client                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           








Hi Guys,


I understand you require an ANT based build for automated nightly builds
within GUMP.

I have just checked in an ANT script I have been using for compiling the
Axis C client, transport and XML parser libraries.  We have used this
regularly for the past month on Windows, Linux (RH AS 3.0) and AIX.
In addition, I have also checked in an ANT script to generate, compile, run
and verify the automated client tests.   I have been experiencing
difficulties with this script on linux, but am still investigating if this
is in the script or code.

I have included the following basic documentation within the ant scripts
(can be viewed by typing ant -projecthelp).   It is my intention to update
the web pages to describe more fully how to use these scripts.
This script is intended for use with Java 1.4+ and Apache ANT 1.6+.
Ant is available from: http://ant.apache.org/

To compile C/C++ code you will require the cpptasks extension to ANT,
within:
      [ant install dir]/lib
This is available from: http://ant-contrib.sourceforge.net/
{Note: you will require the cpptasks download, not ant-contrib}

It is intended that the default target be used, which compiles and links
all code,
generates documentation and packages ready for distribution.

Associated with this build script are property files for each platform, the
script
will automatically determine the correct one to be used;
      - build.Win32.properties
      - build.Linux.properties
      - build.AIX.properties
Please use these to configure directories to suit the needs of your system.

Notes:
* The documentation target requires doxygen be installed and available on
the system path
  This is available from: http://www.doxygen.org
* The following compilers will be required;
      - Windows = Microsoft Visual C++ 6.0
      - Linux   = gcc
      - AIX     = Visual Age




I shall look into compiling the server and samples over the coming days.
If you have any problems, please let me know.

Regards,
Adrian

_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)




RE: ANT scripts for building Axis C client

Posted by Susantha Kumara <su...@opensource.lk>.
Hi Adrian,

This is a great contribution....

Susantha.
---

> -----Original Message-----
> From: Adrian Dick [mailto:adrian.dick@uk.ibm.com]
> Sent: Monday, September 06, 2004 10:38 PM
> To: axis-c-dev@ws.apache.org
> Subject: ANT scripts for building Axis C client
> 
> 
> 
> 
> 
> Hi Guys,
> 
> 
> I understand you require an ANT based build for automated nightly
builds
> within GUMP.
> 
> I have just checked in an ANT script I have been using for compiling
the
> Axis C client, transport and XML parser libraries.  We have used this
> regularly for the past month on Windows, Linux (RH AS 3.0) and AIX.
> In addition, I have also checked in an ANT script to generate,
compile,
> run
> and verify the automated client tests.   I have been experiencing
> difficulties with this script on linux, but am still investigating if
this
> is in the script or code.
> 
> I have included the following basic documentation within the ant
scripts
> (can be viewed by typing ant -projecthelp).   It is my intention to
update
> the web pages to describe more fully how to use these scripts.
> This script is intended for use with Java 1.4+ and Apache ANT 1.6+.
> Ant is available from: http://ant.apache.org/
> 
> To compile C/C++ code you will require the cpptasks extension to ANT,
> within:
>       [ant install dir]/lib
> This is available from: http://ant-contrib.sourceforge.net/
> {Note: you will require the cpptasks download, not ant-contrib}
> 
> It is intended that the default target be used, which compiles and
links
> all code,
> generates documentation and packages ready for distribution.
> 
> Associated with this build script are property files for each
platform,
> the
> script
> will automatically determine the correct one to be used;
>       - build.Win32.properties
>       - build.Linux.properties
>       - build.AIX.properties
> Please use these to configure directories to suit the needs of your
> system.
> 
> Notes:
> * The documentation target requires doxygen be installed and available
on
> the system path
>   This is available from: http://www.doxygen.org
> * The following compilers will be required;
>       - Windows = Microsoft Visual C++ 6.0
>       - Linux   = gcc
>       - AIX     = Visual Age
> 
> 
> 
> 
> I shall look into compiling the server and samples over the coming
days.
> If you have any problems, please let me know.
> 
> Regards,
> Adrian
> 
> _______________________________________
> Adrian Dick (adrian.dick@uk.ibm.com)