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 su...@apache.org on 2004/06/27 06:53:47 UTC

cvs commit: ws-axis/c/vc/server/engine ServerEngineLibrary.dsp

susantha    2004/06/26 21:53:47

  Modified:    c/include/axis/server SoapDeSerializer.h
               c/samples/client/interoptests/cgroupB InteropGroupBClient.c
               c/src/engine SOAPTransportFactory.cpp XMLParserFactory.cpp
               c/src/soap SoapDeSerializer.cpp
               c/src/xml/xerces SoapBinInputStream.cpp SoapInputSource.cpp
                        XMLParserXerces.cpp XercesHandler.cpp
                        XercesHandler.h
               c/tests/client/xsdAnyTest1 ExtensibilityQueryMain.cpp
               c/tests/client/xsdAnyTest1/gen_src
                        ExtensibilityQueryPortType.h
               c/vc/client/engine ClientEngineLibrary.dsp
               c/vc/server/engine ServerEngineLibrary.dsp
  Log:
  Fixed the bugs in SoapDeserializer and Xerces wrapper
  
  Revision  Changes    Path
  1.25      +1 -1      ws-axis/c/include/axis/server/SoapDeSerializer.h
  
  Index: SoapDeSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/SoapDeSerializer.h,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- SoapDeSerializer.h	24 Jun 2004 10:39:31 -0000	1.24
  +++ SoapDeSerializer.h	27 Jun 2004 04:53:47 -0000	1.25
  @@ -206,7 +206,7 @@
       XSDTYPE getXSDType(const AnyElement* pElement);
       int AXISCALL getStatus(){return m_nStatus;};
   	AnyType* AXISCALL getAnyObject();
  -    void serializeTag(AxisString& xmlStr, const AnyElement* node);
  +    void serializeTag(AxisString& xmlStr, const AnyElement* node, AxisString& nsDecls);
   
   private:
       int getElementForAttributes(const AxisChar* pName, 
  
  
  
  1.4       +2 -2      ws-axis/c/samples/client/interoptests/cgroupB/InteropGroupBClient.c
  
  Index: InteropGroupBClient.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/cgroupB/InteropGroupBClient.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InteropGroupBClient.c	6 Apr 2004 05:37:50 -0000	1.3
  +++ InteropGroupBClient.c	27 Jun 2004 04:53:47 -0000	1.4
  @@ -39,12 +39,12 @@
   	{
   		sas.varArray.m_Array[x] = strdup("content of string array element");
   	}
  -	printf("invoking echoNestedArray...\n");
  +/*	printf("invoking echoNestedArray...\n");
   	if (echoNestedArray(pstub, &sas) != NULL)
   		printf("successful\n");
   	else
   		printf("failed\n");
  -
  +*/
   	/*testing Nested Structs*/
   	sss.varFloat = 12345.67890;
   	sss.varInt = 5000;
  
  
  
  1.7       +7 -13     ws-axis/c/src/engine/SOAPTransportFactory.cpp
  
  Index: SOAPTransportFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SOAPTransportFactory.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SOAPTransportFactory.cpp	10 Jun 2004 05:16:32 -0000	1.6
  +++ SOAPTransportFactory.cpp	27 Jun 2004 04:53:47 -0000	1.7
  @@ -25,6 +25,7 @@
   #include <axis/SOAPTransport.h>
   #include <stdio.h>
   #include <axis/server/AxisConfig.h>
  +#include <axis/AxisEngineException.h>
   
   extern AxisConfig* g_pConfig;
   
  @@ -45,19 +46,8 @@
   
   int SOAPTransportFactory::initialize()
   {
  -#ifdef WIN32
  -#ifdef _DEBUG
   	m_pcLibraryPath = g_pConfig->getAxisConfProperty(AXCONF_TRANSPORTHTTP);
  -	//m_pcLibraryPath = "AxisTransport_D.dll"; //this will be taken from configuration file
  -#else
  -	m_pcLibraryPath = g_pConfig->getAxisConfProperty(AXCONF_TRANSPORTHTTP);
  -	//m_pcLibraryPath = "AxisTransport.dll"; //this will be taken from configuration file
  -#endif
  -#else
  -	//m_pcLibraryPath = "/home/damitha/Axis/libs/libaxis_transport.so"; //this will be taken from configuration file
  -	//m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_transport.so"; //this will be taken from configuration file
  -	m_pcLibraryPath = g_pConfig->getAxisConfProperty(AXCONF_TRANSPORTHTTP);
  -#endif
  +
   	if (!loadLib())
   	{
   #if defined(USE_LTDL)
  @@ -73,12 +63,16 @@
           if (!m_Create || !m_Delete)
           {
               unloadLib();
  -            printf("Transport library loading failed");
  +			throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
           }
           else
           {
               return AXIS_SUCCESS;
           }		
  +	}
  +	else
  +	{
  +		throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
   	}
   	return AXIS_FAIL;
   }
  
  
  
  1.11      +7 -13     ws-axis/c/src/engine/XMLParserFactory.cpp
  
  Index: XMLParserFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/XMLParserFactory.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XMLParserFactory.cpp	10 Jun 2004 05:16:32 -0000	1.10
  +++ XMLParserFactory.cpp	27 Jun 2004 04:53:47 -0000	1.11
  @@ -25,6 +25,7 @@
   #include <axis/server/XMLParser.h>
   #include <stdio.h>
   #include <axis/server/AxisConfig.h>
  +#include <axis/AxisEngineException.h>
   
   extern AxisConfig* g_pConfig;
   
  @@ -45,19 +46,8 @@
   
   int XMLParserFactory::initialize()
   {
  -#ifdef WIN32
  -#ifdef _DEBUG
  -	//m_pcLibraryPath = "AxisXMLParser_D.dll"; //this will be taken from configuration file
       m_pcLibraryPath = g_pConfig->getAxisConfProperty(AXCONF_XMLPARSER);
  -#else
  -	//m_pcLibraryPath = "AxisXMLParser.dll"; //this will be taken from configuration file
  -    m_pcLibraryPath = g_pConfig->getAxisConfProperty(AXCONF_XMLPARSER);
  -#endif
  -#else
  -	//m_pcLibraryPath = "/home/damitha/Axis/libs/libaxis_xmlparser.so"; //this will be taken from configuration file
  -	//m_pcLibraryPath = "/usr/local/Axis/libs/libaxis_xmlparser.so"; //this will be taken from configuration file
  -	m_pcLibraryPath = g_pConfig->getAxisConfProperty(AXCONF_XMLPARSER);
  -#endif
  +
   	if (!loadLib())
   	{
   #if defined(USE_LTDL)
  @@ -73,12 +63,16 @@
           if (!m_Create || !m_Delete)
           {
               unloadLib();
  -            printf("Parser library loading failed");
  +			throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
           }
           else
           {
               return AXIS_SUCCESS;
           }		
  +	}
  +	else
  +	{
  +		throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, strdup(m_pcLibraryPath));
   	}
   	return AXIS_FAIL;
   }
  
  
  
  1.68      +26 -10    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.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- SoapDeSerializer.cpp	25 Jun 2004 08:52:02 -0000	1.67
  +++ SoapDeSerializer.cpp	27 Jun 2004 04:53:47 -0000	1.68
  @@ -213,8 +213,8 @@
                   {
                       if (iLevel == HEADER_LEVEL)
                       {
  -        
  -                        pHeaderBlock->setUri(m_pNode->m_pchNamespace);
  +                        if (m_pNode->m_pchNamespace)
  +							pHeaderBlock->setUri(m_pNode->m_pchNamespace);
                           pHeaderBlock->setLocalName(m_pNode->m_pchNameOrValue);
   
                           if ((m_pNode->m_pchAttributes[0]) != NULL)
  @@ -245,9 +245,8 @@
                       else if (iLevel == HEADER_BLOCK_LEVEL)
                       {
                           iHeaderBlockStackLevel++;
  -
  -                        
  -                        pComplexElement->setURI(m_pNode->m_pchNamespace);
  +						if (m_pNode->m_pchNamespace)
  +							pComplexElement->setURI(m_pNode->m_pchNamespace);
                           pComplexElement->setLocalName(m_pNode->
                                                         m_pchNameOrValue);
   
  @@ -3080,6 +3079,8 @@
       int lstSize = 0;
       
       AxisString xmlStr = "";
  +	AxisString nsDecls = "";
  +
       list<AxisString> lstXML;
       
       if (!m_pNode) m_pNode = m_pParser->anyNext();
  @@ -3087,9 +3088,22 @@
   
       while ((END_ELEMENT != m_pNode->m_type) || (tagCount >= 0))
       {
  -        if (CHARACTER_ELEMENT != m_pNode->m_type)
  +		if (START_PREFIX == m_pNode->m_type)
  +		{
  +			nsDecls += " xmlns";
  +			if (m_pNode->m_pchNameOrValue) 
  +			{
  +				nsDecls += ":";
  +				nsDecls += m_pNode->m_pchNameOrValue;
  +			}
  +			nsDecls += "=\"";
  +			nsDecls += m_pNode->m_pchNamespace;
  +			nsDecls += "\"";
  +		}
  +        else if (CHARACTER_ELEMENT != m_pNode->m_type)
           {
  -            serializeTag(xmlStr, m_pNode);
  +            serializeTag(xmlStr, m_pNode, nsDecls);
  +			nsDecls = "";
           }
           else
           {
  @@ -3128,7 +3142,7 @@
   }
   
   
  -void SoapDeSerializer::serializeTag(AxisString& xmlStr, const AnyElement* node)
  +void SoapDeSerializer::serializeTag(AxisString& xmlStr, const AnyElement* node, AxisString& nsDecls)
   {
       /*
          Note that if this is an end tag and since m_pchNameOrValue doesn't give
  @@ -3154,6 +3168,8 @@
           
           xmlStr += node->m_pchNameOrValue;
   
  +		if (!nsDecls.empty()) xmlStr += nsDecls.c_str();
  +
           if (node->m_pchAttributes)
           {
               int j;
  @@ -3170,7 +3186,7 @@
   					if (pchPrefix)
   					{
   						xmlStr += " "; 
  -						xmlStr += node->m_pchAttributes[j+1];
  +						xmlStr += pchPrefix;
   						xmlStr += ":";
   						xmlStr += node->m_pchAttributes[j];
   					}
  @@ -3190,7 +3206,7 @@
           /* if (node->m_pchNamespace) why dont parser set null if there is no
            * namespace
            */
  -        if (node->m_pchNamespace && (strcmp(node->m_pchNamespace, "") != 0))
  +        if (node->m_pchNamespace)
           {
   			pchPrefix = m_pParser->getPrefix4NS(node->m_pchNamespace);
   			if (pchPrefix)
  
  
  
  1.2       +1 -0      ws-axis/c/src/xml/xerces/SoapBinInputStream.cpp
  
  Index: SoapBinInputStream.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/xerces/SoapBinInputStream.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SoapBinInputStream.cpp	18 May 2004 11:09:10 -0000	1.1
  +++ SoapBinInputStream.cpp	27 Jun 2004 04:53:47 -0000	1.2
  @@ -43,5 +43,6 @@
   {
       int iRead = iMaxToRead;
   	m_pInputStream->getBytes((char*)pcToFill, &iRead);
  +	m_nByteCount += iRead;
       return iRead;
   }
  
  
  
  1.2       +1 -1      ws-axis/c/src/xml/xerces/SoapInputSource.cpp
  
  Index: SoapInputSource.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/xerces/SoapInputSource.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SoapInputSource.cpp	18 May 2004 11:09:10 -0000	1.1
  +++ SoapInputSource.cpp	27 Jun 2004 04:53:47 -0000	1.2
  @@ -25,7 +25,7 @@
   
   SoapInputSource::~SoapInputSource()
   {
  -
  +	/* do not delete the m_pInputStream. See Xerces documentation */
   }
   
   BinInputStream* SoapInputSource::makeStream() const
  
  
  
  1.8       +7 -8      ws-axis/c/src/xml/xerces/XMLParserXerces.cpp
  
  Index: XMLParserXerces.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/xerces/XMLParserXerces.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLParserXerces.cpp	25 Jun 2004 06:37:40 -0000	1.7
  +++ XMLParserXerces.cpp	27 Jun 2004 04:53:47 -0000	1.8
  @@ -52,8 +52,7 @@
           delete m_pInputSource;
       
       m_pInputSource = new SoapInputSource(pInputStream);
  -    /* SoapInputSource is(m_pInputStream->transport.pGetFunct, 
  -    m_pInputStream->str.ip_stream); */
  +	m_Xhandler.reset();
       m_pParser->setContentHandler(&m_Xhandler);
        if (m_bFirstParsed)
       {
  @@ -96,12 +95,6 @@
               }
               if (elem)
               {
  -                if ((START_PREFIX == elem->m_type) ||
  -                (END_PREFIX == elem->m_type))
  -                {
  -                    m_Xhandler.freeElement();
  -                    continue;
  -                }
                   if (!isCharData && (CHARACTER_ELEMENT == elem->m_type))
                   { /* ignorable white space */
                       m_Xhandler.freeElement();
  @@ -132,6 +125,11 @@
       bool bCanParseMore = false;
       try
       {
  +		/* 
  +		 * Say the SAX event handler to record prefix mappings too 
  +		 * By default the event handler do not record them.
  +		 */
  +		m_Xhandler.setGetPrefixMappings(true);
           if(!m_bFirstParsed)
           {
               m_pParser->parseFirst(*m_pInputSource, m_ScanToken);
  @@ -149,6 +147,7 @@
               }
               if (elem)
               {
  +				m_Xhandler.setGetPrefixMappings(false);
                   return elem;
               }
               else if (AXIS_FAIL == m_Xhandler.getStatus()) return NULL;
  
  
  
  1.5       +122 -44   ws-axis/c/src/xml/xerces/XercesHandler.cpp
  
  Index: XercesHandler.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/xerces/XercesHandler.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XercesHandler.cpp	25 Jun 2004 07:59:32 -0000	1.4
  +++ XercesHandler.cpp	27 Jun 2004 04:53:47 -0000	1.5
  @@ -15,7 +15,8 @@
    */
   
   /*
  - *    @author sanjaya singharage (sanjayas@opensource.lk)
  + * @author sanjaya singharage (sanjayas@opensource.lk)
  + * @author Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
    */
   #ifdef WIN32
   #pragma warning (disable : 4786)
  @@ -29,37 +30,49 @@
   XercesHandler::XercesHandler()
   {
       m_nStatus = AXIS_SUCCESS;
  -    Nelement = (AnyElement*)malloc(sizeof (AnyElement));
  +	m_pCurrElement = 0;
  +    m_pNextElement = (AnyElement*)malloc(sizeof (AnyElement));
  +	m_pPrefixMappingElement = (AnyElement*)malloc(sizeof (AnyElement));
       m_bEndElementFollows = false;
  +    m_pNextElement->m_pchNameOrValue = 0;
  +    m_pNextElement->m_pchNamespace = 0;
  +	m_pNextElement->m_pchAttributes[0] = 0;
  +    m_pPrefixMappingElement->m_pchNameOrValue = 0;
  +    m_pPrefixMappingElement->m_pchNamespace = 0;
  +	m_pPrefixMappingElement->m_pchAttributes[0] = 0;
  +	m_bGetPrefixMappings = false;
  +	m_bStartElementWaiting = false;
   }
   
   XercesHandler::~XercesHandler()
   {
  +	delete m_pNextElement;
  +	delete m_pPrefixMappingElement;
   }
   
   void XercesHandler::startElement(const XMLCh *const uri,const XMLCh *const 
                                    localname,const XMLCh *const qname,
                                    const Attributes &attrs)
   {
  -    m_pCurrElement = Nelement;
  -    Nelement->m_type = START_ELEMENT;
  -    Nelement->m_pchNameOrValue = XMLString::transcode(localname);
  -    Nelement->m_pchNamespace = XMLString::transcode(uri);
  +    m_pCurrElement = m_pNextElement;
  +    m_pNextElement->m_type = START_ELEMENT;
  +    m_pNextElement->m_pchNameOrValue = XMLString::transcode(localname);
  +    m_pNextElement->m_pchNamespace = XMLString::transcode(uri);
       
       unsigned int len = attrs.getLength();
       unsigned int index;
       unsigned int i = 0;
       for (index = 0; index < len*3; index+=3)
       {    
  -        Nelement->m_pchAttributes[index] = 
  +        m_pNextElement->m_pchAttributes[index] = 
               XMLString::transcode(attrs.getLocalName(i));
  -        Nelement->m_pchAttributes[index+1] = 
  +        m_pNextElement->m_pchAttributes[index+1] = 
               XMLString::transcode(attrs.getURI(i));
  -        Nelement->m_pchAttributes[index+2] = 
  +        m_pNextElement->m_pchAttributes[index+2] = 
               XMLString::transcode(attrs.getValue(i));
           i++;
       }
  -    Nelement->m_pchAttributes[len*3]=NULL;
  +    m_pNextElement->m_pchAttributes[len*3]=NULL;
   }
   
   const XML_Ch* XercesHandler::ns4Prefix(const XML_Ch* prefix)
  @@ -87,9 +100,9 @@
   void XercesHandler::characters(const XMLCh* const chars, 
                                  const unsigned int length)
   {
  -    m_pCurrElement = Nelement;
  -    Nelement->m_type = CHARACTER_ELEMENT;
  -    Nelement->m_pchNameOrValue = XMLString::transcode(chars);
  +    m_pCurrElement = m_pNextElement;
  +    m_pNextElement->m_type = CHARACTER_ELEMENT;
  +    m_pNextElement->m_pchNameOrValue = XMLString::transcode(chars);
   }
   void XercesHandler::ignorableWhitespace(const XMLCh* const chars, 
                                           const unsigned int length)
  @@ -120,29 +133,37 @@
           m_bEndElementFollows = true;
           return;
       }
  -    m_pCurrElement = Nelement;
  -    Nelement->m_type = END_ELEMENT;
  -    Nelement->m_pchNameOrValue = XMLString::transcode(localname);
  -    Nelement->m_pchNamespace = XMLString::transcode(uri);
  -    Nelement->m_pchAttributes[0] = NULL;
  +    m_pCurrElement = m_pNextElement;
  +    m_pNextElement->m_type = END_ELEMENT;
  +    m_pNextElement->m_pchNameOrValue = XMLString::transcode(localname);
  +    m_pNextElement->m_pchNamespace = XMLString::transcode(uri);
  +    m_pNextElement->m_pchAttributes[0] = NULL;
   }
   
   void XercesHandler::startPrefixMapping(const XMLCh* const prefix,
                                          const XMLCh* const uri)
   {
  -    m_pCurrElement = Nelement;
  -    Nelement->m_type = START_PREFIX;
  -    Nelement->m_pchNameOrValue = XMLString::transcode(prefix);
  -    Nelement->m_pchNamespace = XMLString::transcode(uri);
  -    m_NsStack[XMLString::transcode(prefix)] = XMLString::transcode(uri);
  +	char* pchPrefix = XMLString::transcode(prefix);
  +	char* pchUri = XMLString::transcode(uri);
  +    m_NsStack[pchPrefix] = pchUri;
  +	/* Store only if interested in prefix mappings */
  +	if (m_bGetPrefixMappings)
  +	{
  +		m_CurrPrefixMappings[pchPrefix] = pchUri;
  +	}
  +	else
  +	{
  +		XMLString::release(&pchPrefix);
  +		XMLString::release(&pchUri);
  +	}
   }
   
   void XercesHandler::endPrefixMapping(const XMLCh* const prefix)
   {
  -    m_pCurrElement = Nelement;
  -    Nelement->m_type = END_PREFIX;
  -    Nelement->m_pchNameOrValue = XMLString::transcode(prefix);
  -    m_NsStack.erase(XMLString::transcode(prefix));
  +	/* we are not interested in end prefix mapping events in any case */
  +    char* pchPrefix = XMLString::transcode(prefix);
  +    m_NsStack.erase(pchPrefix);
  +	XMLString::release(&pchPrefix);
   }
   
   void XercesHandler::freeElement()
  @@ -151,26 +172,28 @@
       {
           if (m_bEndElementFollows)
           /* free only attributes list if available. Next time 
  -		 * the same Nelement is freed.
  +		 * the same m_pNextElement is freed.
   		 */
           {
               m_bEndElementFollows = false;
  -            Nelement->m_type = END_ELEMENT;
  +            m_pCurrElement->m_type = END_ELEMENT;
   			freeAttributes();
  -            Nelement->m_pchAttributes[0] = NULL;
  +            m_pCurrElement->m_pchAttributes[0] = NULL;
           }
           else
           /* free all inner strings */
           {
  -			if (Nelement->m_pchNameOrValue)
  +			if (m_pCurrElement->m_pchNameOrValue)
   			{
  -				XMLString::release(const_cast<char**>(&(Nelement->m_pchNameOrValue)));
  -				Nelement->m_pchNameOrValue = 0;
  +				XMLString::release(const_cast<char**>(&(m_pCurrElement->
  +					m_pchNameOrValue)));
  +				m_pCurrElement->m_pchNameOrValue = 0;
   			}
  -			if (Nelement->m_pchNamespace)
  +			if (m_pCurrElement->m_pchNamespace)
   			{
  -				XMLString::release(const_cast<char**>(&(Nelement->m_pchNamespace)));
  -				Nelement->m_pchNamespace = 0;
  +				XMLString::release(const_cast<char**>(&(m_pCurrElement->
  +					m_pchNamespace)));
  +				m_pCurrElement->m_pchNamespace = 0;
   			}
   			freeAttributes();
               m_pCurrElement = 0;
  @@ -180,17 +203,72 @@
   
   void XercesHandler::freeAttributes()
   {
  -	for (int x=0; Nelement->m_pchAttributes[x]; x+=3)
  +	for (int x=0; m_pCurrElement->m_pchAttributes[x]; x+=3)
   	{
  -		if (Nelement->m_pchAttributes[x])
  +		if (m_pCurrElement->m_pchAttributes[x])
  +		{
  +			XMLString::release(const_cast<char**>(&(m_pCurrElement->
  +				m_pchAttributes[x])));
  +			m_pCurrElement->m_pchAttributes[x] = 0;
  +			if (m_pCurrElement->m_pchAttributes[x+1])
  +				XMLString::release(const_cast<char**>(&(m_pCurrElement->
  +				m_pchAttributes[x+1])));
  +			if (m_pCurrElement->m_pchAttributes[x+2])
  +				XMLString::release(const_cast<char**>(&(m_pCurrElement->
  +				m_pchAttributes[x+2])));
  +		}
  +	}
  +}
  +
  +AnyElement* XercesHandler::getAnyElement()
  +{
  +	if (m_bGetPrefixMappings)
  +	{
  +		if (m_CurrPrefixMappings.size() > 0)
  +		{
  +			map<const AxisChar*, const AxisChar*>::iterator it = 
  +				m_CurrPrefixMappings.begin();
  +			m_pPrefixMappingElement->m_pchNameOrValue = (*it).first;
  +			m_pPrefixMappingElement->m_pchNamespace = (*it).second;
  +			m_pPrefixMappingElement->m_type = START_PREFIX;
  +			m_CurrPrefixMappings.erase(it);
  +			m_pCurrElement = m_pPrefixMappingElement;
  +			m_bStartElementWaiting = true;
  +		}
  +		else if (m_bStartElementWaiting)
   		{
  -			XMLString::release(const_cast<char**>(&(Nelement->m_pchAttributes[x])));
  -			Nelement->m_pchAttributes[x] = 0;
  -			if (Nelement->m_pchAttributes[x+1])
  -				XMLString::release(const_cast<char**>(&(Nelement->m_pchAttributes[x+1])));
  -			if (Nelement->m_pchAttributes[x+2])
  -				XMLString::release(const_cast<char**>(&(Nelement->m_pchAttributes[x+2])));
  +			m_pCurrElement = m_pNextElement;
  +			m_bStartElementWaiting = false;
   		}
   	}
  +	return m_pCurrElement;
   }
  +
  +void XercesHandler::setGetPrefixMappings(bool bValue)
  +{
  +	m_bGetPrefixMappings = bValue;
  +}
  +
  +
  +void XercesHandler::reset()
  +{
  +    m_nStatus = AXIS_SUCCESS;
  +    m_bEndElementFollows = false;
  +    m_pCurrElement = m_pNextElement;
  +	freeElement();
  +	m_pCurrElement = m_pPrefixMappingElement;
  +	freeElement();
  +	m_bGetPrefixMappings = false;
  +	m_bStartElementWaiting = false;	
  +	m_pCurrElement = 0;
  +	if (m_CurrPrefixMappings.size() > 0)
  +	{
  +		map<const AxisChar*, const AxisChar*>::iterator it = 
  +			m_CurrPrefixMappings.begin();
  +		XMLString::release(const_cast<char**>(&((*it).first)));
  +		XMLString::release(const_cast<char**>(&((*it).second)));
  +		m_CurrPrefixMappings.erase(it);
  +	}
  +}
  +
   
  
  
  
  1.6       +10 -13    ws-axis/c/src/xml/xerces/XercesHandler.h
  
  Index: XercesHandler.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/xerces/XercesHandler.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XercesHandler.h	25 Jun 2004 07:59:32 -0000	1.5
  +++ XercesHandler.h	27 Jun 2004 04:53:47 -0000	1.6
  @@ -34,15 +34,14 @@
   {
   public :
       void freeElement();
  -    int getStatus(){return m_nStatus;};
  +    inline int getStatus(){return m_nStatus;};
       XercesHandler();
       ~XercesHandler();
       const XML_Ch* ns4Prefix(const XML_Ch* prefix);
       const XML_Ch* prefix4NS(const XML_Ch* pcNS);
  -    AnyElement* getAnyElement()
  -    {
  -        return m_pCurrElement;
  -    }
  +    AnyElement* getAnyElement();
  +	void setGetPrefixMappings(bool bValue);
  +	void reset();
   
   private:
       /* -----------------------------------------------------------------------
  @@ -71,15 +70,13 @@
   
       int m_nStatus;
   	bool m_bEndElementFollows;
  -    AnyElement * Nelement;
  -    AnyElement * m_pCurrElement;
  -
  +    AnyElement* m_pNextElement;
  +    AnyElement* m_pPrefixMappingElement;
  +    AnyElement* m_pCurrElement;
       map<AxisXMLString, AxisXMLString> m_NsStack;
  -    void initAnyElement()
  -    {
  -        Nelement->m_pchNameOrValue = NULL;
  -        Nelement->m_pchNamespace = NULL;
  -    }
  +	map<const AxisChar*, const AxisChar*> m_CurrPrefixMappings;
  +	bool m_bGetPrefixMappings;
  +	bool m_bStartElementWaiting;
   	void freeAttributes();
   };
   
  
  
  
  1.3       +1 -1      ws-axis/c/tests/client/xsdAnyTest1/ExtensibilityQueryMain.cpp
  
  Index: ExtensibilityQueryMain.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/xsdAnyTest1/ExtensibilityQueryMain.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExtensibilityQueryMain.cpp	25 Jun 2004 10:07:59 -0000	1.2
  +++ ExtensibilityQueryMain.cpp	27 Jun 2004 04:53:47 -0000	1.3
  @@ -12,7 +12,7 @@
       string str;
       try{
   
  -        ExtensibilityQueryPortType* pStub = new ExtensibilityQueryPortType("http://localhost:8080/axis/testXSDANY",APTHTTP);
  +        ExtensibilityQueryPortType* pStub = new ExtensibilityQueryPortType("http://localhost:5555/axis/testXSDANY",APTHTTP);
           AnyType* pAnyReturn = pStub->query(pAny);
   
           for (int i=0; i<pAnyReturn->_size; i++)
  
  
  
  1.2       +1 -1      ws-axis/c/tests/client/xsdAnyTest1/gen_src/ExtensibilityQueryPortType.h
  
  Index: ExtensibilityQueryPortType.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/xsdAnyTest1/gen_src/ExtensibilityQueryPortType.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExtensibilityQueryPortType.h	24 Jun 2004 12:47:15 -0000	1.1
  +++ ExtensibilityQueryPortType.h	27 Jun 2004 04:53:47 -0000	1.2
  @@ -13,7 +13,7 @@
   class ExtensibilityQueryPortType  :public Stub
   {
   public:
  -	ExtensibilityQueryPortType(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol);
  +	ExtensibilityQueryPortType(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol=APTHTTP);
   	ExtensibilityQueryPortType();
   public:
   	virtual ~ExtensibilityQueryPortType();
  
  
  
  1.8       +16 -0     ws-axis/c/vc/client/engine/ClientEngineLibrary.dsp
  
  Index: ClientEngineLibrary.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/client/engine/ClientEngineLibrary.dsp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ClientEngineLibrary.dsp	2 Jun 2004 18:05:56 -0000	1.7
  +++ ClientEngineLibrary.dsp	27 Jun 2004 04:53:47 -0000	1.8
  @@ -138,8 +138,16 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\..\src\engine\SOAPTransportFactory.cpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\..\src\engine\client\Stub.cpp
   # End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\src\engine\XMLParserFactory.cpp
  +# End Source File
   # End Group
   # Begin Group "Header Files"
   
  @@ -190,7 +198,15 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\..\src\engine\SOAPTransportFactory.h
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\..\include\axis\client\Stub.h
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\src\engine\XMLParserFactory.h
   # End Source File
   # End Group
   # End Target
  
  
  
  1.4       +16 -0     ws-axis/c/vc/server/engine/ServerEngineLibrary.dsp
  
  Index: ServerEngineLibrary.dsp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/vc/server/engine/ServerEngineLibrary.dsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerEngineLibrary.dsp	12 May 2004 07:36:48 -0000	1.3
  +++ ServerEngineLibrary.dsp	27 Jun 2004 04:53:47 -0000	1.4
  @@ -132,6 +132,14 @@
   
   SOURCE=..\..\..\src\engine\SharedObject.cpp
   # End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\src\engine\SOAPTransportFactory.cpp
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\src\engine\XMLParserFactory.cpp
  +# End Source File
   # End Group
   # Begin Group "Header Files"
   
  @@ -175,6 +183,14 @@
   # Begin Source File
   
   SOURCE=..\..\..\src\engine\SharedObject.h
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\src\engine\SOAPTransportFactory.h
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\src\engine\XMLParserFactory.h
   # End Source File
   # End Group
   # End Target