axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/src/engine/client Stub.cpp
Date Thu, 17 Feb 2005 10:41:17 GMT
whitlock    2005/02/17 02:41:17

  Modified:    c/src/engine/client Stub.cpp
  Log:
  AXISCPP-207 Make the 2 setSOAPMethodAttribute methods check for duplicates (instead of just
one and not the other)
  Delete Attributes in the destructor since clients can't do anything with them after the
Stub is deleted and it's awkward for clients to delete them.
  
  Revision  Changes    Path
  1.34      +18 -13    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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Stub.cpp	16 Feb 2005 08:33:28 -0000	1.33
  +++ Stub.cpp	17 Feb 2005 10:41:17 -0000	1.34
  @@ -42,10 +42,16 @@
   Stub::~Stub()
   {
       delete m_pCall;
  -    for (unsigned int j = 0; j < m_vSOAPHeaderBlocks.size(); j++)
  +	unsigned int j=0;
  +    for (j = 0; j < m_vSOAPHeaderBlocks.size(); j++)
       {
   	    delete m_vSOAPHeaderBlocks[j];
       }
  +
  +    for (j = 0; j < m_vSOAPMethodAttributes.size(); j++)
  +    {
  +	    delete m_vSOAPMethodAttributes[j];
  +    }
   }
   
   void Stub::setEndPoint(const char *pcEndPoint)
  @@ -216,7 +222,12 @@
   
   void Stub::setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix,
const AxisChar *pValue)
   {
  -    //Samisa
  +	setSOAPMethodAttribute(pLocalname,pPrefix,NULL,pValue);
  +}
  +
  +void Stub::setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix,

  +                                  const AxisChar *pUri, const AxisChar *pValue)
  +{
       //Check if there is an attribute with the same local name is already set
       IAttribute* pAttribute = this->getFirstSOAPMethodAttribute();
       while( pAttribute )
  @@ -233,8 +244,11 @@
           pAttribute = this->getNextSOAPMethodAttribute();
       }
   
  -    pAttribute = new Attribute(pLocalname, pPrefix, pValue);
  -    m_vSOAPMethodAttributes.push_back(pAttribute);
  +	if (NULL!=pUri)
  +		pAttribute = new Attribute(pLocalname, pPrefix, pUri, pValue);
  +	else
  +		pAttribute = new Attribute(pLocalname, pPrefix, pValue);
  +	m_vSOAPMethodAttributes.push_back(pAttribute);
       m_viCurrentSOAPMethodAttribute = m_vSOAPMethodAttributes.begin();
   }
   
  @@ -311,15 +325,6 @@
       }
   }
   
  -
  -void Stub::setSOAPMethodAttribute(const AxisChar *pLocalname, const AxisChar *pPrefix,

  -                                  const AxisChar *pUri, const AxisChar *pValue)
  -{
  -    IAttribute* pAttribute = new Attribute(pLocalname, pPrefix, pUri, pValue);
  -	m_vSOAPMethodAttributes.push_back(pAttribute);
  -    m_viCurrentSOAPMethodAttribute = m_vSOAPMethodAttributes.begin();
  -}
  -
   void Stub::setTransportTimeout(const long lSeconds)
   {
       if (m_pTransport)
  
  
  

Mime
View raw message