You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2004/08/30 11:43:44 UTC

cvs commit: ws-axis/c/src/engine/client Stub.cpp

samisa      2004/08/30 02:43:44

  Modified:    c/src/engine/client Stub.cpp
  Log:
  Solved the problem of SOAP methods attributes duplicating.
  Jira ID: AXISCPP-144
  
  Revision  Changes    Path
  1.17      +19 -2     ws-axis/c/src/engine/client/Stub.cpp
  
  Index: Stub.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/client/Stub.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Stub.cpp	20 Aug 2004 09:40:11 -0000	1.16
  +++ Stub.cpp	30 Aug 2004 09:43:44 -0000	1.17
  @@ -277,8 +277,25 @@
   
   void Stub::setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix, const AxisChar *pValue)
   {
  -	Attribute* pAttribute = new Attribute(pLocalname, pPrefix, pValue);
  -	m_vSOAPMethodAttributes.push_back(pAttribute);
  +    //Samisa
  +    //Check if there is an attribute with the same local name is already set
  +    Attribute* pAttribute = this->getFirstSOAPMethodAttribute();
  +    while( pAttribute )
  +    {
  +        if( strcmp(pAttribute->getLocalName(), pLocalname) == 0 )
  +        {
  +            //found an attibute alredy set with same name
  +            if(strcmp(pAttribute->getPrefix(), pPrefix) == 0 ) 
  +            {
  +                this->deleteCurrentSOAPMethodAttribute();
  +                break;
  +            }
  +        }
  +        pAttribute = this->getNextSOAPMethodAttribute();
  +    }
  +
  +    pAttribute = new Attribute(pLocalname, pPrefix, pValue);
  +    m_vSOAPMethodAttributes.push_back(pAttribute);
   }
   
   Attribute* Stub::getFirstSOAPMethodAttribute()