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 "Michael Xiong (JIRA)" <ax...@ws.apache.org> on 2006/04/25 10:41:08 UTC

[jira] Created: (AXISCPP-968) WSDL2WS generate wrong code: complex array should not been deleted

WSDL2WS generate wrong code: complex array should not been deleted
------------------------------------------------------------------

         Key: AXISCPP-968
         URL: http://issues.apache.org/jira/browse/AXISCPP-968
     Project: Axis-C++
        Type: Bug

  Components: WSDL processing - RPC  
    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.3
Client-side version Axis java 1.3
Http Server Version:
Apache 2.0.53
Tomcat 2.0.58
    Reporter: Michael Xiong
    Priority: Critical


  [Error Statement]:
I have used AxisCPP1.6Beta version to generate TestWrapper.cpp  like the below:
TestWrapper.cpp :
int TestWrapper::OperationTest(void* pTestMsg)
{
... ...
	MailBoxInformation_Array out0;
... ...
	try
	{
	pWs->GetMailBox(v0,v1,v2,&out0,&out1);
	pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out0),(void*) Axis_Serialize_MailBoxInformation, (void*) Axis_Delete_MailBoxInformation, (void*) Axis_GetSize_MailBoxInformation, ">GetMailBoxResponse>MailBox", Axis_URI_MailBoxInformation);
	delete out0;
... ...
}

>From the generated code, out0 is really a complex array, which is a new  addressing/accessing method introduced from axis-c-1.6 and be used elsewhere.
The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete.
In deed it will been released after out of stack automatically, I think.

[solution]:
I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 781~801 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the generated code will become correct.
                                 else
                                {
                                    containedType = qname.getLocalPart();
                                    writer.write(
                                        "\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"
                                            + i
                                            + "),"
                                            + "(void*) Axis_Serialize_"
                                            + containedType
                                            + ", (void*) Axis_Delete_"
                                            + containedType
                                            + ", (void*) Axis_GetSize_"
                                            + containedType
                                            + ", \""
                                            + returnParamName
                                            + "\", Axis_URI_"
                                            + containedType
                                            + ");\n");
//<mxiong debug 2006/4/25
//                                    writer.write("\tdelete out" + i + ";\n");
//>mxiong debug 2006/4/25
                                }
                            }

So I think it maybe a bug, could you like to check it ? 

-- 
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-968) WSDL2WS generate wrong code: complex array should not been deleted

Posted by "Michael Xiong (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-968?page=comments#action_12376398 ] 

Michael Xiong commented on AXISCPP-968:
---------------------------------------

Hi Adrian Dick,

I want to correct some statement in my Description like below:

----------------------------------------
The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete. 
----------------------------------------
should be:

----------------------------------------
The complex array out0 it-self is an object in stack, not simple memory block, so should not been deleted directly by "delete" operator.
----------------------------------------

So that I think my Description will be more clear to be understood.

Could you please help me to update the above statement in my Description?

Thanks.
Michael Xiong



> WSDL2WS generate wrong code: complex array should not been deleted
> ------------------------------------------------------------------
>
>          Key: AXISCPP-968
>          URL: http://issues.apache.org/jira/browse/AXISCPP-968
>      Project: Axis-C++
>         Type: Bug

>   Components: WSDL processing - RPC
>     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.3
> Client-side version Axis java 1.3
> Http Server Version:
> Apache 2.0.53
> Tomcat 2.0.58
>     Reporter: Michael Xiong
>     Priority: Critical

>
>   [Error Statement]:
> I have used AxisCPP1.6Beta version to generate TestWrapper.cpp  like the below:
> TestWrapper.cpp :
> int TestWrapper::OperationTest(void* pTestMsg)
> {
> ... ...
> 	MailBoxInformation_Array out0;
> ... ...
> 	try
> 	{
> 	pWs->GetMailBox(v0,v1,v2,&out0,&out1);
> 	pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out0),(void*) Axis_Serialize_MailBoxInformation, (void*) Axis_Delete_MailBoxInformation, (void*) Axis_GetSize_MailBoxInformation, ">GetMailBoxResponse>MailBox", Axis_URI_MailBoxInformation);
> 	delete out0;
> ... ...
> }
> From the generated code, out0 is really a complex array, which is a new  addressing/accessing method introduced from axis-c-1.6 and be used elsewhere.
> The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete.
> In deed it will been released after out of stack automatically, I think.
> [solution]:
> I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 781~801 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the generated code will become correct.
>                                  else
>                                 {
>                                     containedType = qname.getLocalPart();
>                                     writer.write(
>                                         "\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"
>                                             + i
>                                             + "),"
>                                             + "(void*) Axis_Serialize_"
>                                             + containedType
>                                             + ", (void*) Axis_Delete_"
>                                             + containedType
>                                             + ", (void*) Axis_GetSize_"
>                                             + containedType
>                                             + ", \""
>                                             + returnParamName
>                                             + "\", Axis_URI_"
>                                             + containedType
>                                             + ");\n");
> //<mxiong debug 2006/4/25
> //                                    writer.write("\tdelete out" + i + ";\n");
> //>mxiong debug 2006/4/25
>                                 }
>                             }
> So I think it maybe a bug, could you like to check it ? 

-- 
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-968) WSDL2WS generate wrong code: complex array should not been deleted

Posted by "Michael Xiong (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-968?page=comments#action_12437993 ] 
            
Michael Xiong commented on AXISCPP-968:
---------------------------------------

Dear all,

Environment:
Tomcat 2.0.58 should be -->
Tomcat 5.0.28

Could someboday help me to update the "Environment:" info ?

Thanks a lot !
Michael Xiong

> WSDL2WS generate wrong code: complex array should not been deleted
> ------------------------------------------------------------------
>
>                 Key: AXISCPP-968
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-968
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: WSDL processing - RPC
>    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.3
> Client-side version Axis java 1.3
> Http Server Version:
> Apache 2.0.53
> Tomcat 2.0.58
>            Reporter: Michael Xiong
>            Priority: Critical
>
>   [Error Statement]:
> I have used AxisCPP1.6Beta version to generate TestWrapper.cpp  like the below:
> TestWrapper.cpp :
> int TestWrapper::OperationTest(void* pTestMsg)
> {
> ... ...
> 	MailBoxInformation_Array out0;
> ... ...
> 	try
> 	{
> 	pWs->GetMailBox(v0,v1,v2,&out0,&out1);
> 	pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out0),(void*) Axis_Serialize_MailBoxInformation, (void*) Axis_Delete_MailBoxInformation, (void*) Axis_GetSize_MailBoxInformation, ">GetMailBoxResponse>MailBox", Axis_URI_MailBoxInformation);
> 	delete out0;
> ... ...
> }
> From the generated code, out0 is really a complex array, which is a new  addressing/accessing method introduced from axis-c-1.6 and be used elsewhere.
> The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete.
> In deed it will been released after out of stack automatically, I think.
> [solution]:
> I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 781~801 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the generated code will become correct.
>                                  else
>                                 {
>                                     containedType = qname.getLocalPart();
>                                     writer.write(
>                                         "\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"
>                                             + i
>                                             + "),"
>                                             + "(void*) Axis_Serialize_"
>                                             + containedType
>                                             + ", (void*) Axis_Delete_"
>                                             + containedType
>                                             + ", (void*) Axis_GetSize_"
>                                             + containedType
>                                             + ", \""
>                                             + returnParamName
>                                             + "\", Axis_URI_"
>                                             + containedType
>                                             + ");\n");
> //<mxiong debug 2006/4/25
> //                                    writer.write("\tdelete out" + i + ";\n");
> //>mxiong debug 2006/4/25
>                                 }
>                             }
> So I think it maybe a bug, could you like to check it ? 

-- 
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


[jira] Commented: (AXISCPP-968) WSDL2WS generate wrong code: complex array should not been deleted

Posted by "Michael Xiong (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-968?page=comments#action_12376401 ] 

Michael Xiong commented on AXISCPP-968:
---------------------------------------

Hi Developers or Admin,
Hi Adrian Dick, 

Sorry, I ignored another statement which need to be corrected.

Here I re-listed  all the two statement should be corrected as below:

---------------------------------------
>From the generated code, out0 is really a complex array, which is a new addressing/accessing method introduced from axis-c-1.6 and be used elsewhere.
The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete. 
-----------------------------------------

should be

---------------------------------------
>From the generated code, out0 is really a complex array, which introduced from axis-c-1.6 and be used elsewhere.
The complex array out0 it-self is an object in stack, not simple memory block, so should not been deleted directly by "delete" operator. 
-----------------------------------------

Thanks a lot!
Michael Xiong


> WSDL2WS generate wrong code: complex array should not been deleted
> ------------------------------------------------------------------
>
>          Key: AXISCPP-968
>          URL: http://issues.apache.org/jira/browse/AXISCPP-968
>      Project: Axis-C++
>         Type: Bug

>   Components: WSDL processing - RPC
>     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.3
> Client-side version Axis java 1.3
> Http Server Version:
> Apache 2.0.53
> Tomcat 2.0.58
>     Reporter: Michael Xiong
>     Priority: Critical

>
>   [Error Statement]:
> I have used AxisCPP1.6Beta version to generate TestWrapper.cpp  like the below:
> TestWrapper.cpp :
> int TestWrapper::OperationTest(void* pTestMsg)
> {
> ... ...
> 	MailBoxInformation_Array out0;
> ... ...
> 	try
> 	{
> 	pWs->GetMailBox(v0,v1,v2,&out0,&out1);
> 	pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out0),(void*) Axis_Serialize_MailBoxInformation, (void*) Axis_Delete_MailBoxInformation, (void*) Axis_GetSize_MailBoxInformation, ">GetMailBoxResponse>MailBox", Axis_URI_MailBoxInformation);
> 	delete out0;
> ... ...
> }
> From the generated code, out0 is really a complex array, which is a new  addressing/accessing method introduced from axis-c-1.6 and be used elsewhere.
> The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete.
> In deed it will been released after out of stack automatically, I think.
> [solution]:
> I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 781~801 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the generated code will become correct.
>                                  else
>                                 {
>                                     containedType = qname.getLocalPart();
>                                     writer.write(
>                                         "\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"
>                                             + i
>                                             + "),"
>                                             + "(void*) Axis_Serialize_"
>                                             + containedType
>                                             + ", (void*) Axis_Delete_"
>                                             + containedType
>                                             + ", (void*) Axis_GetSize_"
>                                             + containedType
>                                             + ", \""
>                                             + returnParamName
>                                             + "\", Axis_URI_"
>                                             + containedType
>                                             + ");\n");
> //<mxiong debug 2006/4/25
> //                                    writer.write("\tdelete out" + i + ";\n");
> //>mxiong debug 2006/4/25
>                                 }
>                             }
> So I think it maybe a bug, could you like to check it ? 

-- 
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] Closed: (AXISCPP-968) WSDL2WS generate wrong code: complex array should not been deleted

Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-968?page=all ]

nadir amra closed AXISCPP-968.
------------------------------

    Fix Version/s: current (nightly)
       Resolution: Fixed

> WSDL2WS generate wrong code: complex array should not been deleted
> ------------------------------------------------------------------
>
>                 Key: AXISCPP-968
>                 URL: http://issues.apache.org/jira/browse/AXISCPP-968
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: WSDL processing - RPC
>    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.3
> Client-side version Axis java 1.3
> Http Server Version:
> Apache 2.0.53
> Tomcat 2.0.58
>            Reporter: Michael Xiong
>            Priority: Critical
>             Fix For: current (nightly)
>
>
>   [Error Statement]:
> I have used AxisCPP1.6Beta version to generate TestWrapper.cpp  like the below:
> TestWrapper.cpp :
> int TestWrapper::OperationTest(void* pTestMsg)
> {
> ... ...
> 	MailBoxInformation_Array out0;
> ... ...
> 	try
> 	{
> 	pWs->GetMailBox(v0,v1,v2,&out0,&out1);
> 	pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out0),(void*) Axis_Serialize_MailBoxInformation, (void*) Axis_Delete_MailBoxInformation, (void*) Axis_GetSize_MailBoxInformation, ">GetMailBoxResponse>MailBox", Axis_URI_MailBoxInformation);
> 	delete out0;
> ... ...
> }
> From the generated code, out0 is really a complex array, which is a new  addressing/accessing method introduced from axis-c-1.6 and be used elsewhere.
> The complex array it-self is an object, not simple memory block, so should not been deleted directly by delete.
> In deed it will been released after out of stack automatically, I think.
> [solution]:
> I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 781~801 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the generated code will become correct.
>                                  else
>                                 {
>                                     containedType = qname.getLocalPart();
>                                     writer.write(
>                                         "\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"
>                                             + i
>                                             + "),"
>                                             + "(void*) Axis_Serialize_"
>                                             + containedType
>                                             + ", (void*) Axis_Delete_"
>                                             + containedType
>                                             + ", (void*) Axis_GetSize_"
>                                             + containedType
>                                             + ", \""
>                                             + returnParamName
>                                             + "\", Axis_URI_"
>                                             + containedType
>                                             + ");\n");
> //<mxiong debug 2006/4/25
> //                                    writer.write("\tdelete out" + i + ";\n");
> //>mxiong debug 2006/4/25
>                                 }
>                             }
> So I think it maybe a bug, could you like to check it ? 

-- 
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