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 "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org> on 2005/03/18 04:02:20 UTC

[jira] Commented: (AXISCPP-256) SoapFault::setParam fails when xsdtype is not a string

     [ http://issues.apache.org/jira/browse/AXISCPP-256?page=comments#action_61171 ]
     
Samisa Abeysinghe commented on AXISCPP-256:
-------------------------------------------

At the moment SoapFault::setParam() method directly access the Param class attributes and set the value:
e.g. pParam->m_Value.pStrValue = new char[strlen((const char*)pValue)+1];

If we have to solve this problem, we have to be sensitive to the type parameter and set the correct data field of the Param class. However, the best solution would be to deligate the responsibility of setting the data members to Param class itself. Hence we have to add a new method to Param class like:

Param::setValue(const void* pValue, XSDTYPE type)
and call this method from SoapFault::setParam(), rather than trying to address the type issues in SoapFault class

> SoapFault::setParam fails when xsdtype is not a string
> ------------------------------------------------------
>
>          Key: AXISCPP-256
>          URL: http://issues.apache.org/jira/browse/AXISCPP-256
>      Project: Axis-C++
>         Type: Bug
>   Components: SOAP
>     Versions: current (nightly)
>     Reporter: Mark Whitlock
>     Priority: Minor
>      Fix For: 1.6 Alpha

>
> SoapFault::setParam used to copy the value into a fault using strdup which assumes the value is a string (which it normally is). But the value could be any type, so this code will fail (and may sigsegv) for types other than strings. I have recently changed the code to replace strdup's with new's and strcpy's, so that is how I discovered this bug, but as yet I haven't fixed 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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira