You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by du...@apache.org on 2005/08/17 11:21:26 UTC

cvs commit: ws-axis/c/src/soap SoapFault.cpp SoapFault.h

dushshantha    2005/08/17 02:21:26

  Modified:    c/src/soap SoapFault.cpp SoapFault.h
  Log:
  I made the following changes to SoapFault::setParam class to accept any type for pValue. Hope this will solve the problem mentioned in the issue AXISCPP-256.
  
  int SoapFault::setParam(Param* pParam, const AxisChar* pchName, const void* pValue, XSDTYPE type)
  {
      if (!pParam) return AXIS_FAIL;
      pParam->m_sName = pchName;
      pParam->setValue( type , (IAnySimpleType*) pValue);
      return AXIS_SUCCESS;
  }
  
  Revision  Changes    Path
  1.58      +6 -6      ws-axis/c/src/soap/SoapFault.cpp
  
  Index: SoapFault.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapFault.cpp,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- SoapFault.cpp	27 Jul 2005 11:13:01 -0000	1.57
  +++ SoapFault.cpp	17 Aug 2005 09:21:26 -0000	1.58
  @@ -256,18 +256,18 @@
       m_sFaultDetail= sDetail;    
   }
   
  -int SoapFault::setParam(Param* pParam, const AxisChar* pchName, const AxisChar* pValue, XSDTYPE type)
  +int SoapFault::setParam(Param* pParam, const AxisChar* pchName, const void* pValue, XSDTYPE type)
   {
       if (!pParam) return AXIS_FAIL;
       pParam->m_sName = pchName;
  -    pParam->setValue(type, new String((xsd__string) pValue));
  +    pParam->setValue( type , (IAnySimpleType*) pValue);
       return AXIS_SUCCESS;
   }
   
   int SoapFault::setFaultcode(const AxisChar* sFaultcode)
   {
       m_pFaultcodeParam = new Param();
  -	setParam(m_pFaultcodeParam, "faultcode", sFaultcode, XSD_STRING); 
  +	setParam(m_pFaultcodeParam, "faultcode", new String((xsd__string)sFaultcode), XSD_STRING); 
       m_sFaultcode= sFaultcode;
   
       return AXIS_SUCCESS;
  @@ -276,7 +276,7 @@
   int SoapFault::setFaultstring(const AxisChar* sFaultstring)
   {
       m_pFaultstringParam = new Param();
  -    setParam(m_pFaultstringParam, "faultstring", sFaultstring, XSD_STRING); 
  +    setParam(m_pFaultstringParam, "faultstring", new String((xsd__string)sFaultstring), XSD_STRING); 
       m_sFaultstring= sFaultstring;
   
       return AXIS_SUCCESS;
  @@ -284,7 +284,7 @@
   int SoapFault::setFaultactor(const AxisChar* sFaultactor)
   {
       m_pFaultactorParam = new Param();
  -    setParam(m_pFaultactorParam, "faultactor", sFaultactor, XSD_STRING); 
  +    setParam(m_pFaultactorParam, "faultactor", new String((xsd__string)sFaultactor), XSD_STRING); 
       m_sFaultactor = sFaultactor;
       
       return AXIS_SUCCESS;
  @@ -293,7 +293,7 @@
   int SoapFault::setFaultDetail(const AxisChar* sFaultDetail)
   {
       m_pFaultDetail = new Param();
  -    setParam(m_pFaultDetail, "appSpecific", sFaultDetail, XSD_STRING);
  +    setParam(m_pFaultDetail, "appSpecific", new String((xsd__string)sFaultDetail), XSD_STRING);
       m_sFaultDetail = sFaultDetail;
       m_bIsSimpleDetail = true;
   
  
  
  
  1.16      +1 -1      ws-axis/c/src/soap/SoapFault.h
  
  Index: SoapFault.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapFault.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SoapFault.h	9 Jun 2005 05:05:54 -0000	1.15
  +++ SoapFault.h	17 Aug 2005 09:21:26 -0000	1.16
  @@ -116,7 +116,7 @@
   
       void setPrefix(const AxisChar* prefix);
   
  -    int setParam(Param* pParam, const AxisChar* pchName, const AxisChar* pValue, XSDTYPE type);
  +    int setParam(Param* pParam, const AxisChar* pchName, const void* pValue, XSDTYPE type);
   
   private:
       string m_sFaultDetail;