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 "Franz Fehringer (JIRA)" <ax...@ws.apache.org> on 2006/01/20 19:15:41 UTC
[jira] Created: (AXISCPP-914) fault/exception/error handling flawed
fault/exception/error handling flawed
-------------------------------------
Key: AXISCPP-914
URL: http://issues.apache.org/jira/browse/AXISCPP-914
Project: Axis-C++
Type: Bug
Components: Client - Stub
Versions: 1.6 Alpha
Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
Reporter: Franz Fehringer
fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
Second there seem to be problems with memory management.
I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
throw fault; // line 588
delete [] const_cast<char*>(detail); // lines 615,720,879
The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
The base class is not copied over there.
More to follow.
--
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-914) fault/exception/error handling flawed
Posted by "Franz Fehringer (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-914?page=all ]
Franz Fehringer updated AXISCPP-914:
------------------------------------
Attachment: vakanz.wsdl
vakanz.xsd
> fault/exception/error handling flawed
> -------------------------------------
>
> Key: AXISCPP-914
> URL: http://issues.apache.org/jira/browse/AXISCPP-914
> Project: Axis-C++
> Type: Bug
> Components: Client - Stub
> Versions: 1.6 Alpha
> Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
> Reporter: Franz Fehringer
> Attachments: vakanz.wsdl, vakanz.xsd
>
> fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
> First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
> The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
> Second there seem to be problems with memory management.
> I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
> throw fault; // line 588
> delete [] const_cast<char*>(detail); // lines 615,720,879
> The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
> In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
> The base class is not copied over there.
> More to follow.
--
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-914) fault/exception/error handling flawed
Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
[ https://issues.apache.org/jira/browse/AXISCPP-914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
nadir amra closed AXISCPP-914.
------------------------------
Resolution: Fixed
Fix Version/s: current (nightly)
Franz,
I am closing this issue because I do not think this is a problem any longer. However, if I am mistaken please reopen. I fixed the copying of the base class in SOAP Exception.
> fault/exception/error handling flawed
> -------------------------------------
>
> Key: AXISCPP-914
> URL: https://issues.apache.org/jira/browse/AXISCPP-914
> Project: Axis-C++
> Issue Type: Bug
> Components: Client - Stub
> Affects Versions: 1.6 Alpha
> Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
> Reporter: Franz Fehringer
> Fix For: current (nightly)
>
> Attachments: PegsPortType.cpp, t_ErrorResponse.cpp, vakanz.wsdl, vakanz.xsd
>
>
> fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
> First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
> The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
> Second there seem to be problems with memory management.
> I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
> throw fault; // line 588
> delete [] const_cast<char*>(detail); // lines 615,720,879
> The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
> In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
> The base class is not copied over there.
> More to follow.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://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] Updated: (AXISCPP-914) fault/exception/error handling flawed
Posted by "Franz Fehringer (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-914?page=all ]
Franz Fehringer updated AXISCPP-914:
------------------------------------
Attachment: PegsPortType.cpp
t_ErrorResponse.cpp
> fault/exception/error handling flawed
> -------------------------------------
>
> Key: AXISCPP-914
> URL: http://issues.apache.org/jira/browse/AXISCPP-914
> Project: Axis-C++
> Type: Bug
> Components: Client - Stub
> Versions: 1.6 Alpha
> Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
> Reporter: Franz Fehringer
> Attachments: PegsPortType.cpp, t_ErrorResponse.cpp, vakanz.wsdl, vakanz.xsd
>
> fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
> First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
> The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
> Second there seem to be problems with memory management.
> I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
> throw fault; // line 588
> delete [] const_cast<char*>(detail); // lines 615,720,879
> The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
> In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
> The base class is not copied over there.
> More to follow.
--
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-914) fault/exception/error handling
flawed
Posted by "nadir amra (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-914?page=comments#action_12460399 ]
nadir amra commented on AXISCPP-914:
------------------------------------
Franz ,
I am at a loss to explain memory corruption problems you are having. I had made changes to the code in the past month and maybe that would resolve your problems?
> fault/exception/error handling flawed
> -------------------------------------
>
> Key: AXISCPP-914
> URL: http://issues.apache.org/jira/browse/AXISCPP-914
> Project: Axis-C++
> Issue Type: Bug
> Components: Client - Stub
> Affects Versions: 1.6 Alpha
> Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
> Reporter: Franz Fehringer
> Attachments: PegsPortType.cpp, t_ErrorResponse.cpp, vakanz.wsdl, vakanz.xsd
>
>
> fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
> First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
> The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
> Second there seem to be problems with memory management.
> I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
> throw fault; // line 588
> delete [] const_cast<char*>(detail); // lines 615,720,879
> The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
> In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
> The base class is not copied over there.
> More to follow.
--
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-914) fault/exception/error handling
flawed
Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-914?page=comments#action_12368383 ]
Adrian Dick commented on AXISCPP-914:
-------------------------------------
The Fault model is a known weak area. Sometime ago I made a proposal to re-work the model, including extending support for SOAP 1.2 (the proposal can be seen here: http://marc.theaimsgroup.com/?l=axis-c-dev&m=111640463326474&w=2 )
Alas, this piece of work has yet not been undertaken.
However, I have recently done a little work on improving memory management within Faults (although there is bound to be more that can be done).
> fault/exception/error handling flawed
> -------------------------------------
>
> Key: AXISCPP-914
> URL: http://issues.apache.org/jira/browse/AXISCPP-914
> Project: Axis-C++
> Type: Bug
> Components: Client - Stub
> Versions: 1.6 Alpha
> Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
> Reporter: Franz Fehringer
> Attachments: PegsPortType.cpp, t_ErrorResponse.cpp, vakanz.wsdl, vakanz.xsd
>
> fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
> First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
> The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
> Second there seem to be problems with memory management.
> I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
> throw fault; // line 588
> delete [] const_cast<char*>(detail); // lines 615,720,879
> The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
> In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
> The base class is not copied over there.
> More to follow.
--
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-914) fault/exception/error handling
flawed
Posted by "Franz Fehringer (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXISCPP-914?page=comments#action_12459352 ]
Franz Fehringer commented on AXISCPP-914:
-----------------------------------------
Recently i got another problem with memory corruption, namely that in the STRINGCOPY, the line
delete [] tgt;
yielded access violations resp. "user defined breakpoint" messages.
I made the following rewrite (after then it was OK):
$ pwd
/cd/d/Quellen/SVN/axis/c/src/soap
Index: SoapFaultException.cpp
===================================================================
--- SoapFaultException.cpp (Revision 480584)
+++ SoapFaultException.cpp (Arbeitskopie)
@@ -46,10 +46,8 @@
SoapFaultException(const AxisChar *code, const AxisChar *string,
const AxisChar *actor, int exceptionCode) : AxisException(exceptionCode, string)
{
- m_code = NULL;
- m_actor = NULL;
- STRINGCOPY(m_code,code);
- STRINGCOPY(m_actor,actor);
+ m_code = strdup(code);
+ m_actor = strdup(actor);
}
SoapFaultException::
@@ -62,16 +60,16 @@
SoapFaultException::
SoapFaultException(const SoapFaultException& copy): AxisException(copy)
{
- STRINGCOPY(m_code, copy.m_code);
- STRINGCOPY(m_actor, copy.m_actor);
+ m_code = strdup(copy.m_code);
+ m_actor = strdup(copy.m_actor);
}
SoapFaultException& SoapFaultException::
operator=(const SoapFaultException& copy)
{
exception::operator=(copy);
- STRINGCOPY(m_code, copy.m_code);
- STRINGCOPY(m_actor, copy.m_actor);
+ m_code = strdup(copy.m_code);
+ m_actor = strdup(copy.m_actor);
m_sMessage = copy.m_sMessage;
m_iExceptionCode = copy.m_iExceptionCode;
return *this;
@@ -80,8 +78,8 @@
SoapFaultException::
~SoapFaultException() throw()
{
- delete [] m_code;
- delete [] m_actor;
+ free(m_code);
+ free(m_actor);
}
@@ -106,7 +104,7 @@
void SoapFaultException::
setFaultCode(const AxisChar *code)
{
- STRINGCOPY(m_code,code);
+ m_code = strdup(code);
}
void SoapFaultException::
@@ -118,7 +116,7 @@
void SoapFaultException::
setFaultActor(const AxisChar *actor)
{
- STRINGCOPY(m_actor,actor);
+ m_actor= strdup(actor);
}
> fault/exception/error handling flawed
> -------------------------------------
>
> Key: AXISCPP-914
> URL: http://issues.apache.org/jira/browse/AXISCPP-914
> Project: Axis-C++
> Issue Type: Bug
> Components: Client - Stub
> Affects Versions: 1.6 Alpha
> Environment: WIN2KSP4 JDK1.5.0_06 MSVC6SP6
> Reporter: Franz Fehringer
> Attachments: PegsPortType.cpp, t_ErrorResponse.cpp, vakanz.wsdl, vakanz.xsd
>
>
> fault/exception/error handling seems to be flawed in several respects (in what follows i refer to my attached example).
> First the intention of the WSDL/XSD writers clearly was to expect an ErrorResponse element inside the soap:faultdetail for the error scenario of all three requests (and i think they are right so).
> The Axis generated code instead looks for LoginFault, LogoutFault and SearchRoomsFault.
> Second there seem to be problems with memory management.
> I get user defined breakpoints and/or access violations at (all in PegsPortType.cpp)
> throw fault; // line 588
> delete [] const_cast<char*>(detail); // lines 615,720,879
> The const_cast as well as the interplay between assignment and delete operations generally look fishy too me.
> In my investigations i stumbled over the generated t_ErrorResponse (derived from SoapFaultException) copy constructor.
> The base class is not copied over there.
> More to follow.
--
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