axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ros...@apache.org
Subject cvs commit: ws-axis/c/include/axis/soap SoapHeader.h HeaderBlock.h
Date Fri, 13 Feb 2004 07:42:45 GMT
roshan      2004/02/12 23:42:45

  Modified:    c/src/engine HandlerPool.cpp
               c/src/soap SoapHeader.cpp SoapDeSerializer.cpp
                        HeaderBlock.cpp
               c/include/axis/common IHandlerSoapDeSerializer.h
               c/include/axis/soap SoapHeader.h HeaderBlock.h
  Log:
  Changes to support SOAP Headers and Handlers
  
  Revision  Changes    Path
  1.19      +20 -0     ws-axis/c/src/engine/HandlerPool.cpp
  
  Index: HandlerPool.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/HandlerPool.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- HandlerPool.cpp	3 Feb 2004 13:04:47 -0000	1.18
  +++ HandlerPool.cpp	13 Feb 2004 07:42:44 -0000	1.19
  @@ -252,6 +252,7 @@
   		pWSDDH = (*it);
   		if ((Status = GetHandler(&pBH, sSessionId, pWSDDH->GetScope(),pWSDDH->GetLibId()))
== AXIS_SUCCESS)
   		{
  +			/*
   			if (NORMAL_HANDLER == pBH->_functions->GetType(pBH->_object))
   			{                
   				((Handler*)(pBH->_object))->SetOptionList(pWSDDH->GetParameterList());   
            
  @@ -261,6 +262,25 @@
   			{
   				Status = WRONG_HANDLER_TYPE;
   				break;
  +			}
  +			*/
  +
  +			if (0 != pBH->_functions) 
  +			{
  +				/* C Handler */
  +			} 
  +			else if (0 != pBH->_object) 
  +			{
  +				if (NORMAL_HANDLER == ((Handler*)(pBH->_object))->GetType())
  +				{                
  +					((Handler*)(pBH->_object))->SetOptionList(pWSDDH->GetParameterList());  
             
  +					pChain->AddHandler(pBH, pWSDDH->GetScope(), pWSDDH->GetLibId());        
       
  +				}
  +				else
  +				{
  +					Status = WRONG_HANDLER_TYPE;
  +					break;
  +				}
   			}
   		}
   		else
  
  
  
  1.13      +27 -0     ws-axis/c/src/soap/SoapHeader.cpp
  
  Index: SoapHeader.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapHeader.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SoapHeader.cpp	3 Feb 2004 13:04:47 -0000	1.12
  +++ SoapHeader.cpp	13 Feb 2004 07:42:44 -0000	1.13
  @@ -210,3 +210,30 @@
   
   	return AXIS_SUCCESS;
   }
  +
  +IHeaderBlock* SoapHeader::getHeaderBlock(const AxisChar *pName, const AxisChar *pNamespace)
  +{
  +	HeaderBlock* tmpHeaderBlock = NULL;
  +
  +	list<HeaderBlock*>::iterator itCurrHeaderBlock= m_headerBlocks.begin();
  +	bool blnFoundStatus = false;
  +
  +	while (itCurrHeaderBlock != m_headerBlocks.end()) {			
  +		tmpHeaderBlock = (*itCurrHeaderBlock);
  +
  +		if ((strcmp((tmpHeaderBlock->m_localname).c_str(), pName) == 0) && 
  +				(strcmp((tmpHeaderBlock->m_uri).c_str(), pNamespace) == 0)) {
  +			blnFoundStatus = true;
  +			m_headerBlocks.remove(tmpHeaderBlock);
  +			break;
  +		}
  +
  +		itCurrHeaderBlock++;
  +	}
  +
  +	if (blnFoundStatus) {
  +		return tmpHeaderBlock;
  +	} else {
  +		return NULL;
  +	}
  +}
  
  
  
  1.27      +8 -4      ws-axis/c/src/soap/SoapDeSerializer.cpp
  
  Index: SoapDeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- SoapDeSerializer.cpp	3 Feb 2004 13:04:47 -0000	1.26
  +++ SoapDeSerializer.cpp	13 Feb 2004 07:42:44 -0000	1.27
  @@ -173,8 +173,8 @@
   IHeaderBlock* SoapDeSerializer::GetHeaderBlock(const AxisChar* pName, const AxisChar* pNamespace)
   {
   	if (!m_pHeader) return NULL; /* there has been no <Header> element so there can
be no Header blocks */
  -	/*TODO*/
  -	return NULL;
  +	
  +	return (HeaderBlock*)m_pHeader->getHeaderBlock(pName, pNamespace);
   }
   											   
   int SoapDeSerializer::GetHeader()
  @@ -212,7 +212,7 @@
   						pHeaderBlock->setUri(m_pNode->m_pchNamespace);
   						pHeaderBlock->setLocalName(m_pNode->m_pchNameOrValue);
   
  -						if ((m_pNode->m_pchAttributes) != NULL) {
  +						if ((m_pNode->m_pchAttributes[0]) != NULL) {
   							int iAttributeArrayIndex = 0;
   							while (true) {
   								Attribute* pAttribute = new Attribute();
  @@ -251,7 +251,11 @@
   				} else if (CHARACTER_ELEMENT == m_pNode->m_type) {
   					pCharacterElement = new CharacterElement(m_pNode->m_pchNameOrValue);
   
  -					pComplexElement->addChild(pCharacterElement);
  +					if (iLevel == HEADER_BLOCK_LEVEL) {
  +						pHeaderBlock->addChild(pCharacterElement);
  +					} else {
  +						pComplexElement->addChild(pCharacterElement);
  +					}
   				}
   			}
   		}
  
  
  
  1.11      +3 -1      ws-axis/c/src/soap/HeaderBlock.cpp
  
  Index: HeaderBlock.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/HeaderBlock.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- HeaderBlock.cpp	3 Feb 2004 13:04:47 -0000	1.10
  +++ HeaderBlock.cpp	13 Feb 2004 07:42:44 -0000	1.11
  @@ -120,7 +120,9 @@
   
   void HeaderBlock::setValue(const AxisChar* value)
   {
  -	m_value= value;
  +	//m_value= value;
  +
  +	/* I think that now this method is not needed, roshan */
   }
   
   int HeaderBlock::serialize(SoapSerializer& pSZ)
  
  
  
  1.5       +1 -0      ws-axis/c/include/axis/common/IHandlerSoapDeSerializer.h
  
  Index: IHandlerSoapDeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/common/IHandlerSoapDeSerializer.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IHandlerSoapDeSerializer.h	28 Jan 2004 10:23:11 -0000	1.4
  +++ IHandlerSoapDeSerializer.h	13 Feb 2004 07:42:44 -0000	1.5
  @@ -93,6 +93,7 @@
   	virtual xsd__hexBinary AXISCALL GetBodyAsHexBinary()=0;
   	virtual xsd__base64Binary AXISCALL GetBodyAsBase64Binary()=0;
   	virtual int AXISCALL SetNewSoapBody(AxisChar* pNewSoapBody)=0;
  +	virtual IHeaderBlock* GetHeaderBlock(const AxisChar* pName, const AxisChar* pNamespace)
= 0;
   };
   
   #else
  
  
  
  1.4       +1 -0      ws-axis/c/include/axis/soap/SoapHeader.h
  
  Index: SoapHeader.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/soap/SoapHeader.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SoapHeader.h	3 Feb 2004 04:45:53 -0000	1.3
  +++ SoapHeader.h	13 Feb 2004 07:42:44 -0000	1.4
  @@ -100,6 +100,7 @@
   	//string m_strHeaderSerialized;
   	const char* m_pcPrefix;
   public:
  +	IHeaderBlock* getHeaderBlock(const AxisChar* pName, const AxisChar* pNamespace);
   	int setPrefix(const char* pcPrefix);
   	/**
   	 * Removes the next HeaderBlock from the list and returns it. But will not delete it.
  
  
  
  1.5       +5 -1      ws-axis/c/include/axis/soap/HeaderBlock.h
  
  Index: HeaderBlock.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/soap/HeaderBlock.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HeaderBlock.h	3 Feb 2004 13:04:45 -0000	1.4
  +++ HeaderBlock.h	13 Feb 2004 07:42:44 -0000	1.5
  @@ -103,6 +103,7 @@
   
   class HeaderBlock : public IHeaderBlock
   {
  +friend class SoapHeader;
   
   private:	
   	int serializeNamespaceDecl(SoapSerializer& pSZ);
  @@ -117,8 +118,11 @@
   	AxisString m_uri;
   	list<Attribute*> m_attributes;
   	list<Attribute*> m_namespaceDecls;
  +
  +	/* I think that now this member varialble is not needed, i.e m_value roshan 
   	AxisString m_value;
  -	//string m_strSerialized;
  +	*/
  +
   
   public:
   	bool operator ==( const HeaderBlock &objHeaderBlock);
  
  
  

Mime
View raw message