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 ax...@ws.apache.org on 2004/09/03 05:03:50 UTC
[jira] Created: (AXISCPP-149) Memory cleaning of generated C++ array code
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXISCPP-149
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXISCPP-149
Summary: Memory cleaning of generated C++ array code
Type: Improvement
Status: Open
Priority: Major
Project: Axis-C++
Components:
WSDL processing
Fix Fors:
1.3 Beta
Versions:
current (nightly)
Assignee: Samisa Abeysinghe
Reporter: Samisa Abeysinghe
Created: Thu, 2 Sep 2004 8:02 PM
Updated: Thu, 2 Sep 2004 8:02 PM
Environment: All Platforms
Description:
In case of Arrays, I noticed that the WSDL2WS tool is generating a
struct.
e.g.
typedef struct SOAPStruct_ArrayTag
{
SOAPStruct* m_Array;
int m_Size;
} SOAPStruct_Array;
The trouble here is that in case of returned values/parameters the user
has to delete the m_Array mamber explicitly.
I think a more cleaner way would be to use a class here and use a
destructor to clean memory.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Closed: (AXISCPP-149) Memory cleaning of generated C++ array
code
Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
nadir amra closed AXISCPP-149.
------------------------------
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Issue Type: Improvement
> Components: WSDL processing - RPC
> Affects Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assigned To: Adrian Dick
> Fix For: 1.6 Alpha
>
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: Compile AXIS C++ source using ANT
Posted by John Hawkins <HA...@uk.ibm.com>.
http://ws.apache.org/axis/cpp/documentation.html
"Catherine Chando" <ag...@nortel.com>
21/12/2005 14:16
Please respond to
"Apache AXIS C Developers List"
To
Apache AXIS C Developers List <ax...@ws.apache.org>
cc
Subject
Compile AXIS C++ source using ANT
Hi,
Can someone please point me on how to use ANT to compile the AXIS C++
source .
I am using the AXIS C++ binary file and I release that I cannot load the
libaxiscpp_mod.so
library because it was not compiled with the -DEAPI option. So I need to
compile that
shared object library again to be able to use it with Apache.
Catherine
Compile AXIS C++ source using ANT
Posted by Catherine Chando <ag...@nortel.com>.
Hi,
Can someone please point me on how to use ANT to compile the AXIS C++
source .
I am using the AXIS C++ binary file and I release that I cannot load the
libaxiscpp_mod.so
library because it was not compiled with the -DEAPI option. So I need to
compile that
shared object library again to be able to use it with Apache.
Catherine
compile failure of test CombinedChoice.xml
Posted by Nadir Amra <am...@us.ibm.com>.
Kicking the tires on the new memory management fixes.
While attempting to run test
c/tests/auto_build/testcases/tests/CombinedChoice.xml, I get a compile
error when compiling CombinedChoiceClient.cpp. Here are the errors:
[cc]
"/home/amra/axis/L051218/obj/test/generated/cpp/UnitTest_CombinedChoice/CombinedChoiceClient.cpp",
line 15.36: CZP021
6(30) An expression of type "int *" cannot be converted to type "int **".
[cc]
"/home/amra/axis/L051218/obj/test/generated/cpp/UnitTest_CombinedChoice/CombinedChoiceClient.cpp",
line 16.39: CZP02
16(30) An expression of type "int" cannot be converted to type "int *".
The offending lines in the code are the two lines after the instantiation
of the object:
ChoiceComplexType* Value0=new ChoiceComplexType();
Value0->IntValue = new int;
*(Value0->IntValue) = 5;
The header file defines the field as:
xsd__int* * IntValue;
So my question is what is it suppose to be and how is it working on other
platforms?
Nadir K. Amra
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_12360280 ]
nadir amra commented on AXISCPP-149:
------------------------------------
Attempted to test on OS/400. The first test case failed to build because:
Definition not found for symbol 'set__Q2_7axiscpp14xsd__int_ArrayFPPiCi'.
I tracked it down to AxisUserAPIArrays.hpp...it seems that the set() functions such as
void set(xsd__duration** array, const int size);
has "const" while the implementation of said functions which is defined in AxisUserAPI.cpp does not:
void xsd__duration_Array::set(xsd__duration** array, int size)
I see no reason for the "const" and would like to remove. Any objections?
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Dushshantha Chandradasa
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array
code
Posted by Nadir Amra <am...@us.ibm.com>.
Adrian, I am just wondering whether this affected any of the external
APIs. I understand if this could not be helped, but it would be nice to
know what APIs or classes have changed.
Nadir K. Amra
"Adrian Dick (JIRA)" <ax...@ws.apache.org> wrote on 12/07/2005
03:14:12 AM:
> [ http://issues.apache.org/jira/browse/AXISCPP-149?
> page=comments#action_12359558 ]
>
> Adrian Dick commented on AXISCPP-149:
> -------------------------------------
>
> I have made a number of modifications to the API and internal
> implementation to more neatly handle memory cleaning of arrays.
>
> The WSDL2Ws tooling has also been updated to reflect these changes,
> and also include a number of changes for the correct memory cleaning
> of other objects passed between the application and the axis engine.
>
> At this time the WSDL2Ws changes are complete for client-side
> doc/literal generated stubs. Server-side and rpc/encoded changes
> are still being applied.
>
> > Memory cleaning of generated C++ array code
> > -------------------------------------------
> >
> > Key: AXISCPP-149
> > URL: http://issues.apache.org/jira/browse/AXISCPP-149
> > Project: Axis-C++
> > Type: Improvement
> > Components: WSDL processing - RPC
> > Versions: 1.3 Final
> > Environment: All Platforms
> > Reporter: Samisa Abeysinghe
> > Assignee: Adrian Dick
> > Fix For: 1.6 Alpha
>
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_12359558 ]
Adrian Dick commented on AXISCPP-149:
-------------------------------------
I have made a number of modifications to the API and internal implementation to more neatly handle memory cleaning of arrays.
The WSDL2Ws tooling has also been updated to reflect these changes, and also include a number of changes for the correct memory cleaning of other objects passed between the application and the axis engine.
At this time the WSDL2Ws changes are complete for client-side doc/literal generated stubs. Server-side and rpc/encoded changes are still being applied.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Adrian Dick
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=history ]
Samisa Abeysinghe updated AXISCPP-149:
--------------------------------------
Assign To: (was: Samisa Abeysinghe)
This falls under removal of C style coding within the engine and desing of C wrapper layer.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Fix For: 1.4 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_12360296 ]
Adrian Dick commented on AXISCPP-149:
-------------------------------------
In reference to the comment made by Nadir ( http://issues.apache.org/jira/browse/AXISCPP-149#action_12360280 ):
I had intended to use 'const' throughout, but as you mention there is no reason to use "const" at all in this case.
So, I think we should go in and remove all the offending occurances - I don't believe this will make any significate difference to the API and it's use. (If it does the test suite should pick it up quickly enough)
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Dushshantha Chandradasa
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_12359566 ]
Dushshantha Chandradasa commented on AXISCPP-149:
-------------------------------------------------
RPC client side is done. Server dise can be fixed very soon.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Dushshantha Chandradasa
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_12359700 ]
Dushshantha Chandradasa commented on AXISCPP-149:
-------------------------------------------------
server side is also done. tested on Windows. If somebody can test on other platforms and confirm the accuracy, it would be a great help.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Dushshantha Chandradasa
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
Adrian Dick reassigned AXISCPP-149:
-----------------------------------
Assign To: Dushshantha Chandradasa (was: Adrian Dick)
I'm now assigning this to you, Dushshantha, as you're completing the WSDL2Ws work for rpc/encoded and server-side.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Dushshantha Chandradasa
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Dushshantha Chandradasa (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_12360287 ]
Dushshantha Chandradasa commented on AXISCPP-149:
-------------------------------------------------
Doc/lit server side is perfectly working with windows. Can test with InteropTestRound1Doc test case. The service for this test is InreopBaseDoc.
In RPC, there is a deserialization problem. The deserializer returns a null array. It looks to me as the deserializer cannot correctly handle the wrapper element of the array.
<ns1:echoStringArray xmlns:ns1="http://soapinterop.org/">
<inputStringArray xmlns:enc="http://www.w3.org/2001/06/soap-encoding" enc:arrayType="xsd:string[2]">
<item>0th element of string array</item>
<item>1th element of string array</item>
</inputStringArray>
</ns1:echoStringArray>
service fails to deserialize this part of the message.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Dushshantha Chandradasa
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=history ]
Mark Whitlock reassigned AXISCPP-149:
-------------------------------------
Assign To: Mark Whitlock
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Mark Whitlock
> Fix For: 1.4 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by ax...@ws.apache.org.
The following issue has been updated:
Updater: Samisa Abeysinghe (mailto:samisa_abeysinghe@yahoo.com)
Date: Sun, 17 Oct 2004 11:58 PM
Comment:
I guess this could be part of proposed WSDL2Ws tool refactoring for 1.4.
One thing to note is that using a class here would disable C support (this is why this was not fixed for 1.3)
Need to analyze how C support to be put back in place in 1.5 would be affected by the fix done for this issue.
Changes:
Version changed to 1.3 Final
Version changed from current (nightly)
Fix Version changed to 1.4 Alpha
Fix Version changed from 1.3 Beta
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/AXISCPP-149?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXISCPP-149
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXISCPP-149
Summary: Memory cleaning of generated C++ array code
Type: Improvement
Status: Open
Priority: Major
Project: Axis-C++
Components:
WSDL processing
Fix Fors:
1.4 Alpha
Versions:
1.3 Final
Assignee: Samisa Abeysinghe
Reporter: Samisa Abeysinghe
Created: Thu, 2 Sep 2004 8:02 PM
Updated: Sun, 17 Oct 2004 11:58 PM
Environment: All Platforms
Description:
In case of Arrays, I noticed that the WSDL2WS tool is generating a
struct.
e.g.
typedef struct SOAPStruct_ArrayTag
{
SOAPStruct* m_Array;
int m_Size;
} SOAPStruct_Array;
The trouble here is that in case of returned values/parameters the user
has to delete the m_Array mamber explicitly.
I think a more cleaner way would be to use a class here and use a
destructor to clean memory.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by ax...@ws.apache.org.
The following comment has been added to this issue:
Author: Mark Whitlock
Created: Mon, 18 Oct 2004 8:03 AM
Body:
I think changing the generated struct to a class that represents an array is an excellent idea, with Axis_Array as the superclass of all generated classes that represent arrays, freeing storage in the destructor and overloading operator[].
Work could be done in the C bindings layer to support this. The existing generated struct is probably the correct solution for C arrays. So the C bindings layer for the Call::add/get Cmplx/Basic Array methods would have to convert between a struct Axis_Array_C and a class Axis_Array. Much of the storage that is returned from the C bindings will have been new'ed, so a (C-only) freeStubStorage will be needed.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_54307
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXISCPP-149
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXISCPP-149
Summary: Memory cleaning of generated C++ array code
Type: Improvement
Status: Open
Priority: Major
Project: Axis-C++
Components:
WSDL processing
Fix Fors:
1.4 Alpha
Versions:
1.3 Final
Assignee: Samisa Abeysinghe
Reporter: Samisa Abeysinghe
Created: Thu, 2 Sep 2004 8:02 PM
Updated: Mon, 18 Oct 2004 8:03 AM
Environment: All Platforms
Description:
In case of Arrays, I noticed that the WSDL2WS tool is generating a
struct.
e.g.
typedef struct SOAPStruct_ArrayTag
{
SOAPStruct* m_Array;
int m_Size;
} SOAPStruct_Array;
The trouble here is that in case of returned values/parameters the user
has to delete the m_Array mamber explicitly.
I think a more cleaner way would be to use a class here and use a
destructor to clean memory.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Resolved: (AXISCPP-149) Memory cleaning of generated C++
array code
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
Adrian Dick resolved AXISCPP-149:
---------------------------------
Resolution: Fixed
I believe this piece of work to now be complete.
Based on the testcases available, this is working for client and server, for both doc/literal and rpc/encoded.
Should anyone find any missed items, it would be useful to raise those as seperate JIRA issues to aid tracking - as this issue ended up being a huge catch-all for memory related problems.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Adrian Dick
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
Adrian Dick reassigned AXISCPP-149:
-----------------------------------
Assign To: Adrian Dick (was: Fred Preston)
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Adrian Dick
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Lilantha Darshana (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_57475 ]
Lilantha Darshana commented on AXISCPP-149:
-------------------------------------------
I don't know what you folks thinks about this matter. Because, struct and classes are almost same in C++, with exceptions like of all defined members of struct are public. Therefore, we do not need converting generated struct to clases, rather we can introduce a destructor to the struct itself like:
typedef struct SOAPStruct_ArrayTag
{
SOAPStruct* m_Array;
int m_Size;
~SOAPStruct_ArrayTag(){
delete [] m_Array;
}
} SOAPStruct_Array;
Further to the comment on this issues about inheritance. struct support inheritance but with some limitations due to all public members of the base class, you would not able to hide anything from derived clases.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Mark Whitlock
> Fix For: 1.4 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Mark Whitlock (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_58920 ]
Mark Whitlock commented on AXISCPP-149:
---------------------------------------
I have done some more investigation on this JIRA with the intention of fixing it for 1.5 but I have now decided to leave it for a future release.
There are several possible solutions, but the solution that I would prefer would be to make Axis_Array a template that fully encapsulates the array and size and has constructors and destructors that deep copy the data. So...
template<class T> class AxisArrayT {
public:
AxisArrayT();
AxisArrayT(int size);
virtual ~AxisArrayT();
AxisArrayT(AxisArrayT& copy);
virtual AxisArrayT& operator=(AxisArray that);
T& operator[](int index);
private:
T *m_Array;
int m_Size;
}
typedef AxisArrayT<xsd_int> xsd_int_Array;
Also the generated array classes would be specific instances of AxisArrayT<>. The advantages of this model are that the destructor cleans up the array storage (making client programming simpler), the data is fully encapsulated which is good OO practice, the class can be used as an array because it overloads operator[] and the class contains all the methods required to manipulate the data (not all listed here).
Unfortunately this would require large changes to SoapSerializer, SoapDeSerializer, ArrayBean, Param and other classes. Any method that was passed or returned one of these templates would need to be templatised itself since it would need to take the generalised form of the template not a specific instance. So...
template<class X> void Call::addBasicArrayParameter(AxisArrayT<class T> array, XSDTYPE type, const AxisChar *name)
There would also be considerable changes to wsdl2ws. Although I think this is a good long term solution, the amount of work involved puts me off implementing it in this release.
I also investigated simpler solutions that would clean up array storage in the client but be simpler to implement. One suggestion is to simply add a destructor to the existing Axis_Array. This is dangerous since then all copies of an Axis_Array would point to the same array storage. When the first got deleted (or went out of scope) it's destructor would delete the array storage, and now other copies would reference invalid storage and fail on deletion if not before.
The SoapDeSerializer (and others) passes around these array classes by value so copies are made and destroyed regularly. So this fix is not simple either.
Another problem here is that the C++ compiler is free to create "temporary instances" of objects if it thinks it needs to. These "temporaries" are not referred to by local variables in the source code but are new'ed and deleted by the code that the compiler generates. So when compiler-generated code deleted one of these "temporaries", the array storage would also be deleted.
Consequently I think the simplest and safest solution in this release is to leave Axis_Array as is and force client applications to explicitly delete returned storage.
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Mark Whitlock
> Fix For: 1.4 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Assigned: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Fred Preston (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
Fred Preston reassigned AXISCPP-149:
------------------------------------
Assign To: Fred Preston (was: Mark Whitlock)
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Fred Preston
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Assigned: (AXISCPP-149) Memory cleaning of generated C++
array code
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
Adrian Dick reassigned AXISCPP-149:
-----------------------------------
Assign To: Adrian Dick (was: Dushshantha Chandradasa)
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing - RPC
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Adrian Dick
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-149?page=all ]
Samisa Abeysinghe updated AXISCPP-149:
--------------------------------------
Fix Version: 1.6 Alpha
(was: 1.4 Alpha)
This was repeatedly postponed due to the complexity involved.
This would most probably be done in 1.6
> Memory cleaning of generated C++ array code
> -------------------------------------------
>
> Key: AXISCPP-149
> URL: http://issues.apache.org/jira/browse/AXISCPP-149
> Project: Axis-C++
> Type: Improvement
> Components: WSDL processing
> Versions: 1.3 Final
> Environment: All Platforms
> Reporter: Samisa Abeysinghe
> Assignee: Mark Whitlock
> Fix For: 1.6 Alpha
>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
> SOAPStruct* m_Array;
> int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a
> destructor to clean memory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Posted by ax...@ws.apache.org.
The following comment has been added to this issue:
Author: Samisa Abeysinghe
Created: Fri, 3 Sep 2004 2:43 AM
Body:
This is much tougher than I thought.
I made the WSDL2Ws tool generate a class for Array in place of struct, and also made it work with the UDDI inquire client.
However this made the samples break. Specially it breaks the server side. Having a detailed look I found that the deserializer uses AxisArray, which is a struct to create array structs and assign that to the array atruct to be returend by casting (mind you they arer structs and hence no inheritance) In C++ programing I am not sure how appropriate this is. Hence the solution would be to change serializer/deserializer to make AxisArray a class and inherit all the array types from that. But this breaks the C services support.
Hence I think we would have to differ this until the engine is redesigned.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_52787
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXISCPP-149
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXISCPP-149
Summary: Memory cleaning of generated C++ array code
Type: Improvement
Status: Open
Priority: Major
Project: Axis-C++
Components:
WSDL processing
Fix Fors:
1.3 Beta
Versions:
current (nightly)
Assignee: Samisa Abeysinghe
Reporter: Samisa Abeysinghe
Created: Thu, 2 Sep 2004 8:02 PM
Updated: Fri, 3 Sep 2004 2:43 AM
Environment: All Platforms
Description:
In case of Arrays, I noticed that the WSDL2WS tool is generating a
struct.
e.g.
typedef struct SOAPStruct_ArrayTag
{
SOAPStruct* m_Array;
int m_Size;
} SOAPStruct_Array;
The trouble here is that in case of returned values/parameters the user
has to delete the m_Array mamber explicitly.
I think a more cleaner way would be to use a class here and use a
destructor to clean memory.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira