axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <>
Subject [jira] Closed: (AXISCPP-1006) The static const string 's declaration style is not very good(which will cause g++ compiling warning) inside the generated header file
Date Sat, 02 Dec 2006 02:04:21 GMT
     [ ]

nadir amra closed AXISCPP-1006.

    Fix Version/s:  1.6 Beta
       Resolution: Fixed

> The static const string 's declaration style is not very good(which will cause g++ compiling
warning) inside the generated header file
> --------------------------------------------------------------------------------------------------------------------------------------
>                 Key: AXISCPP-1006
>                 URL:
>             Project: Axis-C++
>          Issue Type: Improvement
>          Components: WSDL processing - RPC, WSDL processing - Doc
>    Affects Versions:  1.6 Beta
>         Environment:     Platform:
>         Linux fedora 3.0
> Axis version:
>         Server-side Axis C++ 1.6Beta
> XML Parser Lib:
> xersesc 2.6
> WSDL2ws tool by using axis java 1.4
> Client-side version Axis java 1.4
> Http Server Version:
> Apache 2.0.53
>            Reporter: Michael Xiong
>         Assigned To: nadir amra
>            Priority: Minor
>             Fix For:  1.6 Beta
>         Attachments:,
> I'm using axiscpp1.6-b to develop a web service, and found a minor problem of it's WSDl2Ws
tool. Although it only cause a c++ compiling warning when I try to build the generated code
by g++, the descipline of my building-system is not allow any compiling warning, so that I
can not continue to build it.
> The below is the description of this problem and my solution:
> [problem]
> The generated header file: xxx.hpp has some static constant string definition like the
> In FooBar.hpp:
> static const char* Axis_URI_FooBar = "";
> static const char* Axis_TypeName_FooBar = "FooBar";
> This will cause g++ to report compiling warning like:
> warning: ' Axis_URI_FooBar ' defined but not used
> But indeed in FooBar.cpp, the "Axis_URI_FooBar" was actually used.
> [analysis]
> Except for FooBar.cpp, there are also other .cpp files which included FooBar.hpp.
> The "static" means each translation unit (.cpp file) gets its
> own copy of the variable (unless it's a compile-time constant, which it is
> not, because the 'const' is on the left side of the star *).
> So each of the  translation units which included the FooBar.hpp, get a copy of it that
they don't use.
> Thus it will cause the above compiling warning.
> [solution]
> I've examined the source code of axiscpp::WSDL2Ws tool, and fixed this problem by modifying
the following .java code: inside the writePreprocessorStatements() method.
> src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/
> src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/
> Detail please refer to the attached .java files.
> The basic idea is to change the declaration style as the below:
> static const char Axis_URI_FooBar[] = "";
> static const char Axis_TypeName_FooBar[] = "FooBar";

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message