axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject cvs commit: ws-axis/c/src/soap ComplexElement.h SoapBody.h SoapEnvelope.h SoapFault.h SoapFaults.h SoapKeywordMapping.h SoapMethod.h SoapParserExpat.h URIMapping.h XMLStreamHandler.h
Date Tue, 23 Mar 2004 06:11:44 GMT
damitha     2004/03/22 22:11:44

  Added:       c/include/server/simple_axis_server HTTP_KeyWords.h
                        ServerHelper.h
               c/src/soap ComplexElement.h SoapBody.h SoapEnvelope.h
                        SoapFault.h SoapFaults.h SoapKeywordMapping.h
                        SoapMethod.h SoapParserExpat.h URIMapping.h
                        XMLStreamHandler.h
  Removed:     c/include/axis/soap ComplexElement.h SoapBody.h
                        SoapEnvelope.h SoapFault.h SoapFaults.h
                        SoapMethod.h SoapParserExpat.h URIMapping.h
                        XMLStreamHandler.h
  Log:
  In the process of restructuring the source as described in Susantha's mail titled
  FW: Work items for the Release - FYI
  
  Revision  Changes    Path
  1.1                  ws-axis/c/include/server/simple_axis_server/HTTP_KeyWords.h
  
  Index: HTTP_KeyWords.h
  ===================================================================
  /* -*- C++ -*- */
  
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "SOAP" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   *
   *
   *
   * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk)
   *
   */
  
  #if !defined(AFX_HTTPKEYWORDS_H__INCLUDED_)
  #define AFX_HTTPKEYWORDS_H__INCLUDED_
  
  #include <string>
  
  using namespace std;
  
  enum HTTP_MAP_KEYWORDS {
  	HMK_URI, /*For HTTP URI*/
  	HMK_METHOD, /*For HTTP method (eg: GET, POST etc)*/
  	HMK_VERSION, /*For HTTP Version*/
  	HMK_HOST, /*For Host name*/
  	HMK_CONTENT_TYPE, /*For Content Type*/
  	HMK_CONTENT_LENGTH, /*For Content Length*/
  
  	HMK_LAST /*For Representing the last item of the enumeration*/
  };
  
  enum HTTP_KEYWORDS {
  	HK_POST, /*For HTTP POST*/
  	HK_GET, /*For HTTP GET*/
  	HK_HTTP_1_1, /*For HTTP 1.1*/
  	HK_HTTP_UNKNOWN_VERSION, /*For unknown versions of HTTP*/
  
  	HK_LAST /*For Representing the last item of the enumeration*/
  };
  
  #endif // !defined(AFX_HTTPKEYWORDS_H__INCLUDED_)
  
  
  
  1.1                  ws-axis/c/include/server/simple_axis_server/ServerHelper.h
  
  Index: ServerHelper.h
  ===================================================================
  /* -*- C++ -*- */
  
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "SOAP" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   *
   *
   *
   * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk)
   *
   */
  
  #if !defined(AFX_SERVERHELPER_H__INCLUDED_)
  #define AFX_SERVERHELPER_H__INCLUDED_
  
  #include <string>
  #include <map>
  
  #include "HTTP_KeyWords.h"
  
  using namespace std;
  
  enum CONTENT_TYPE {
  	HTTP_KEYWORD_TYPE,
  	STRING_TYPE
  };
  
  union uHttpMapContent /*this is used to store both the HTTP_KEYWORDS enumerated contents
and strings*/
  {
  	HTTP_KEYWORDS eHTTP_KEYWORD; //for HTTP_KEYWORDS enumerated contents
  	const char* msValue; //for string content
  };	
  
  struct HTTP_MAP_TYPE {
  	CONTENT_TYPE eCONTENT_TYPE;
  	uHttpMapContent* objuHttpMapContent;
  };
  
  int getSeperatedHTTPParts(string sClientReqStream, string& sHTTPHeaders, string&
sHTTPBody, map<HTTP_MAP_KEYWORDS, HTTP_MAP_TYPE*> *map_HTTP_Headers);
  int	initializeHeaderMap(const string &HeaderLine, map<HTTP_MAP_KEYWORDS, HTTP_MAP_TYPE*>
*map_HTTP_Headers);
  int getHttpHeader(HTTP_MAP_KEYWORDS eKeyWord, map<HTTP_MAP_KEYWORDS, HTTP_MAP_TYPE*>
*map_HTTP_Headers, HTTP_MAP_TYPE *objMapContent);
  
  #endif // !defined(AFX_SERVERHELPER_H__INCLUDED_)
  
  
  
  1.7       +57 -19    ws-axis/c/src/soap/ComplexElement.h
  
  
  
  
  1.7       +22 -20    ws-axis/c/src/soap/SoapBody.h
  
  
  
  
  1.8       +11 -7     ws-axis/c/src/soap/SoapEnvelope.h
  
  
  
  
  1.10      +11 -5     ws-axis/c/src/soap/SoapFault.h
  
  
  
  
  1.9       +5 -5      ws-axis/c/src/soap/SoapFaults.h
  
  
  
  
  1.5       +8 -7      ws-axis/c/src/soap/SoapKeywordMapping.h
  
  
  
  
  1.13      +35 -28    ws-axis/c/src/soap/SoapMethod.h
  
  
  
  
  1.1                  ws-axis/c/src/soap/SoapParserExpat.h
  
  Index: SoapParserExpat.h
  ===================================================================
  /* -*- C++ -*- */
  
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "SOAP" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   *
   *
   *
   * @author Susantha Kumara (skumara@virtusa.com)
   *
   */
  #ifdef WIN32
  #pragma warning (disable : 4786)
  #endif
  
  #if !defined(__SoapParserExpat_H_INCLUDED__)
  #define __SoapParserExpat_H_INCLUDED__
  
  #include <expat/expat.h>
  #include <axis/common/Packet.h>
  
  #include "../xml/QName.h"
  #include <axis/xml/AnyElement.h>
  #include "../xml/Event.h"
  #include <axis/xml/XMLParser.h>
  
  #include <queue>
  #include <map>
  #include <string>
  
  using namespace std;
  
  class SoapParserExpat: public XMLParser
  {
  private:
  	XML_Parser m_Parser;
  	const Ax_soapstream* m_pInputStream;
  	const char* m_pCurrentBuffer;
  	axisxml::Event* m_pLastEvent;
  	AnyElement m_Element;
  	queue<axisxml::Event*> m_Events;
  	map<AxisXMLString, AxisXMLString> m_NsStack;
  	int m_nStatus;
  	AXIS_TRANSPORT_STATUS m_nTransportStatus;
  public:
  	SoapParserExpat();
  	~SoapParserExpat();
  private:
  	void startElement(const XMLCh *qname,const XMLCh **attrs);
  	void endElement(const XMLCh *qname);
  	void characters(const XMLCh *chars,int length);
  	void startPrefixMapping(const XMLCh *prefix, const XMLCh *uri);
  	void endPrefixMapping(const XMLCh *prefix);
  	int ParseNext();
  
  	inline static void XMLCALL s_startElement(void* p, const XMLCh *qname,const XMLCh **attrs)
  	{((SoapParserExpat*)p)->startElement(qname,attrs);};
  	inline static void XMLCALL s_endElement(void* p, const XMLCh *qname)
  	{((SoapParserExpat*)p)->endElement(qname);};
  	inline static void XMLCALL s_characters(void* p, const XMLCh *chars,int length)
  	{((SoapParserExpat*)p)->characters(chars,length);};
  	inline static void XMLCALL s_startPrefixMapping(void* p, const XMLCh *prefix, const XMLCh
*uri)
  	{((SoapParserExpat*)p)->startPrefixMapping(prefix, uri);};
  	inline static void XMLCALL s_endPrefixMapping(void* p, const XMLCh *prefix)
  	{((SoapParserExpat*)p)->endPrefixMapping(prefix);};
  
  public:
  	int SetInputStream(const Ax_soapstream* pInputStream);
  	const Ax_soapstream* GetInputStream(){return m_pInputStream;};
  	int Init();
  	const XMLCh* GetNS4Prefix(const XMLCh* prefix);
  	int GetStatus();
  	const AnyElement* Next();
  	AXIS_TRANSPORT_STATUS GetTransportStatus(){ return m_nTransportStatus;};
  	void SetTransportStatus(AXIS_TRANSPORT_STATUS nStatus){ m_nTransportStatus = nStatus;};
  };
  
  #endif
  
  
  
  1.9       +8 -6      ws-axis/c/src/soap/URIMapping.h
  
  
  
  
  1.10      +8 -9      ws-axis/c/src/soap/XMLStreamHandler.h
  
  
  
  

Mime
View raw message