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 2005/03/24 11:12:01 UTC

cvs commit: ws-axis/contrib/wsa4c/utils MacAddress.cpp UUIDGen.cpp UUIDGen.hpp

sanjaya     2005/03/24 02:12:01

  Modified:    contrib/wsa4c/addressing Action.cpp Action.hpp Adress.cpp
                        Adress.hpp AttributedQName.cpp AttributedQName.hpp
                        AttributedURI.cpp AttributedURI.hpp Constants.cpp
                        Constants.hpp EndpointReferenceType.cpp
                        EndpointReferenceType.hpp FaultTo.cpp FaultTo.hpp
                        From.cpp From.hpp MessageID.cpp MessageID.hpp
                        PortType.cpp PortType.hpp ReferenceProperties.cpp
                        ReferenceProperties.hpp RelatesTo.cpp RelatesTo.hpp
                        RelationshipType.hpp ReplyTo.cpp ReplyTo.hpp
                        ServiceNameType.cpp ServiceNameType.hpp To.cpp
                        To.hpp
               contrib/wsa4c/utils MacAddress.cpp UUIDGen.cpp UUIDGen.hpp
  Added:       contrib/wsa4c/addressing AddressingHeaders.cpp
                        AddressingHeaders.hpp ClientHandler.cpp
                        ServerHandler.cpp WsaClientHandler.cpp
                        WsaClientHandler.hpp WsaServerHandler.cpp
                        WsaServerHandler.hpp
  Log:
  changes and new files commited on 24.03.2005
  
  Revision  Changes    Path
  1.3       +1 -1      ws-axis/contrib/wsa4c/addressing/Action.cpp
  
  Index: Action.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/Action.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Action.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ Action.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -31,7 +31,7 @@
   
   #include "Action.hpp" 	
   
  -Action::Action(AxisChar * pachUri)
  +Action::Action(const AxisChar * pachUri)
   :AttributedUri(Constants.ACTION,pachUri)
   {
   }
  
  
  
  1.3       +5 -12     ws-axis/contrib/wsa4c/addressing/Action.hpp
  
  Index: Action.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/Action.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Action.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ Action.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -33,19 +33,12 @@
   #define __ACTION_OF_AXIS_INCLUDED__
   
   #include "AttributedURI.hpp"
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/IMessageData.hpp>
   
  -class Action:public AttributedUri {
  +class Action:public AttributedUri 
  +{
   public:
  -    /*
  -     * Constructor Action
  -     * 
  -     * @param uri 
  -     */
  -     Action(AxisChar * pachUri);
  -
  -     
  -      
  -  };
  +     Action(const AxisChar * pachUri);
  +};
   
   #endif
  
  
  
  1.3       +2 -1      ws-axis/contrib/wsa4c/addressing/Adress.cpp
  
  Index: Adress.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/Adress.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Adress.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ Adress.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -31,9 +31,10 @@
   
   #include "Adress.hpp" 	
   
  -Address::Address(AxisChar * pachUri)
  +Address::Address(const AxisChar * pachUri)
   :AttributedUri(Constants.ADDRESS,pachUri)
   {
  +    
   }
     
   
  
  
  
  1.3       +3 -10     ws-axis/contrib/wsa4c/addressing/Adress.hpp
  
  Index: Adress.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/Adress.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Adress.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ Adress.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -35,16 +35,9 @@
   #include "AttributedURI.hpp"
   #include <string>
   
  -class Address:public AttributedUri {
  +class Address:public AttributedUri 
  +{
   public:
  -    /***
  -     * Constructor Adress
  -     * 
  -     * @param uri 
  -     */
  -    Address(AxisChar * pachUri);
  -
  -    
  -      
  +    Address(const AxisChar * pachUri);      
   };
   #endif
  
  
  
  1.3       +75 -29    ws-axis/contrib/wsa4c/addressing/AttributedQName.cpp
  
  Index: AttributedQName.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/AttributedQName.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributedQName.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ AttributedQName.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -34,25 +34,67 @@
   
   AttributedQName::AttributedQName()
   {
  -	m_pachLocalName = "\0";
  -	m_pachUri = "\0";
  -	m_pachQname = "\0";
  +	m_pachLocalName = NULL;
  +	m_pachUri = NULL;
  +	m_pachQname = NULL;
   
   }
  +
   AttributedQName::AttributedQName(const AxisChar* pachLocalName, const AxisChar* pachUri)
   {
  -	m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  -    strcpy(m_pachLocalName, pachLocalName);
  -	m_pachUri = (AxisChar*) malloc(strlen(pachUri)+1);
  -	strcpy(m_pachUri,pachUri);
  -	m_pachQname = "\0";
  +    if(pachLocalName != NULL && pachUri != NULL)
  +    {
  +	    m_pachLocalName = new AxisChar(strlen(pachLocalName)+1);
  +        strcpy(m_pachLocalName, pachLocalName);
  +	    m_pachUri = new AxisChar(strlen(pachUri)+1);
  +	    strcpy(m_pachUri,pachUri);
  +    }
  +	m_pachQname = NULL;
  +}
  +
  +AttributedQName::AttributedQName(const AxisChar* pachQname)
  +{
  +    if(pachQname != NULL)
  +    {
  +        AxisChar *pachTemQname = new AxisChar(strlen(pachQname)+1);
  +        strcpy(pachTemQname,pachQname);
  +        AxisChar * p = pachTemQname;
  +        m_pachUri = pachTemQname;
  +        while(*p!='\0')
  +        { 
  +            if(*p==':')
  +            {
  +                m_pachUri = p+1;
  +                *p = '\0';
  +                m_pachLocalName =pachTemQname;
  +                break;
  +            }
  +            p++;
  +        }
  +        if(m_pachQname!=NULL)
  +            delete(m_pachQname);
  +        m_pachQname = new AxisChar(strlen(pachQname)+1);
  +        strcpy(m_pachQname,pachQname);      
  +    }
   }
   
   AttributedQName::~AttributedQName()
   {	
  -	free(m_pachLocalName);
  -	free(m_pachUri);
  -	free(m_pachQname);
  +    if(m_pachLocalName != NULL)
  +    {
  +	    delete(m_pachLocalName);
  +        m_pachLocalName = NULL;
  +    }
  +    if(m_pachUri != NULL)
  +    {
  +	    delete(m_pachUri);
  +        m_pachUri = NULL;
  +    }
  +    if(m_pachQname != NULL)
  +    {
  +	    delete(m_pachQname);
  +        m_pachQname = NULL;
  +    }
   }
   
   AxisChar * AttributedQName::getLocalName()
  @@ -60,10 +102,10 @@
   	return m_pachLocalName;
   }
   
  -void AttributedQName::setLocalName(AxisChar * pachLocalName)
  +void AttributedQName::setLocalName(const AxisChar * pachLocalName)
   {
  -	free(m_pachLocalName);
  -	m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  +	delete(m_pachLocalName);
  +	m_pachLocalName = new AxisChar(strlen(pachLocalName)+1);
       strcpy(m_pachLocalName, pachLocalName);
   }
   
  @@ -72,31 +114,35 @@
   	return m_pachUri;
   }
   
  -void AttributedQName::setUri(AxisChar * pachUri)
  +void AttributedQName::setUri(const AxisChar * pachUri)
   {
  -	free(m_pachUri);
  -	m_pachUri = (AxisChar*) malloc(strlen(pachUri)+1);
  +    if(m_pachUri!=NULL)
  +	    delete(m_pachUri);
  +	m_pachUri = new AxisChar(strlen(pachUri)+1);
   	strcpy(m_pachUri,pachUri);
   
   }
   
   AxisChar * AttributedQName::getQname()
   {  
  -    if(strlen(m_pachQname)!=0)
  -		 free(m_pachQname);
  +    if(m_pachQname!=NULL)
  +        delete(m_pachQname);
   
  -	m_pachQname = (AxisChar*) malloc(strlen(m_pachLocalName)+strlen(m_pachUri)+5);
  -	
  -    if(strlen(m_pachUri)!=0){
  -		strcpy(m_pachQname,m_pachUri);
  -        if(strlen(m_pachLocalName)!=0){
  -            strcat(m_pachQname,":");
  -		    strcat(m_pachQname,m_pachLocalName);		    
  +    if(m_pachUri != NULL)
  +    {	
  +        m_pachQname = (AxisChar*) malloc(strlen(m_pachLocalName)+strlen(m_pachUri)+5);	
  +        if(m_pachLocalName!=0)
  +        {
  +            strcpy(m_pachQname,m_pachLocalName);
  +		    strcat(m_pachQname,":");
  +            strcat(m_pachQname,m_pachUri);
  +        }
  +        else
  +        {
  +            strcpy(m_pachQname,m_pachUri);
           }
       }
  -    if(strlen(m_pachQname)==0)
  -        return "";
  -	
  +    	
   	return m_pachQname;	
   }
   
  
  
  
  1.3       +6 -5      ws-axis/contrib/wsa4c/addressing/AttributedQName.hpp
  
  Index: AttributedQName.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/AttributedQName.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributedQName.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ AttributedQName.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -31,9 +31,9 @@
   
   #if !defined(__ATTRIBUTED_QNAME_INCLUDED__)
   #define __ATTRIBUTED_QNAME_INCLUDED__
  -#include <axis/server/BasicNode.hpp>
  -#include <axis/server/IHeaderBlock.hpp>
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/BasicNode.hpp>
  +#include <axis/IHeaderBlock.hpp>
  +#include <axis/IMessageData.hpp>
   
   AXIS_CPP_NAMESPACE_USE
   
  @@ -47,12 +47,13 @@
   	AttributedQName();
   	~AttributedQName();
   	AttributedQName(const AxisChar* pachLocalName, const AxisChar* pachUri);
  +    AttributedQName(const AxisChar* pachQName);    
   	const AxisChar * toUri();
   	AxisChar * getLocalName();
  -	void setLocalName(AxisChar * pachLocalName);
  +	void setLocalName(const AxisChar * pachLocalName);
   	AxisChar * getUri();
   	AxisChar * getQname();
  -	void setUri(AxisChar * pachUri);
  +	void setUri(const AxisChar * pachUri);
   	virtual IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);
      
   };
  
  
  
  1.3       +55 -27    ws-axis/contrib/wsa4c/addressing/AttributedURI.cpp
  
  Index: AttributedURI.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/AttributedURI.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributedURI.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ AttributedURI.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -30,29 +30,46 @@
   
   
   #include "AttributedURI.hpp"  
  +#include <stdio.h>
  +#include <stdlib.h>
     
   AttributedUri::AttributedUri() 
   {
  +    m_pachLocalName = NULL;
  +    m_pachUri = NULL;
   }
   
  -AttributedUri::AttributedUri(AxisChar * pachLocalName,AxisChar * pachUri)
  +AttributedUri::AttributedUri(const AxisChar * pachLocalName,const AxisChar * pachUri)
   {
  -	m_pachLocalName = (AxisChar*) malloc(strlen(pachUri)+1);
  -    strcpy(m_pachLocalName,pachLocalName);
  -    m_pachUri = (AxisChar*) malloc(strlen(pachUri)+1);
  -    strcpy(m_pachUri, pachUri);	   
  +    if(pachLocalName != NULL && pachUri != NULL)
  +    {
  +        m_pachLocalName = (AxisChar*)malloc(strlen(pachLocalName)+1);
  +        strcpy(m_pachLocalName,pachLocalName);
  +        m_pachUri = (AxisChar*)malloc(strlen(pachUri)+1);
  +        strcpy(m_pachUri, pachUri);	   
  +    }
  +        
   }
   
   AttributedUri::~AttributedUri()
   {
  -	free(m_pachLocalName);
  -    free(m_pachUri);
  -}
  -
  -void AttributedUri::setUri(AxisChar * pachUri)
  -{
  -    free(m_pachUri);
  -    m_pachUri = (AxisChar*) malloc(strlen(pachUri)+1);
  +    if(m_pachLocalName!=NULL)
  +    {
  +	    free(m_pachLocalName);
  +        m_pachLocalName = NULL;
  +    }
  +    if(m_pachUri!=NULL)
  +    {
  +        free(m_pachUri);
  +        m_pachUri = NULL;
  +    }
  +}
  +
  +void AttributedUri::setUri(const AxisChar * pachUri)
  +{
  +    if(m_pachUri!=NULL)
  +        free(m_pachUri);
  +    m_pachUri = (AxisChar*)malloc(strlen(pachUri)+1);
       strcpy(m_pachUri, pachUri);	
   }
   
  @@ -61,10 +78,11 @@
       return m_pachUri;
   }
   
  -void AttributedUri::setLocalName(AxisChar * pachLocalName)
  +void AttributedUri::setLocalName(const AxisChar * pachLocalName)
   {
  -    free(m_pachLocalName);
  -    m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  +    if(m_pachLocalName!=NULL)
  +        free(m_pachLocalName);
  +    m_pachLocalName = (AxisChar*)malloc(strlen(pachLocalName)+1);
       strcpy(m_pachLocalName,pachLocalName);
   }
   
  @@ -73,24 +91,34 @@
       return m_pachLocalName;
   }
   
  -AxisChar * AttributedUri::getLocalName();
  +void AttributedUri::setMustUnderstand(bool bMustUnderstand)
  +{
  +    m_bMustUnderstand = bMustUnderstand;
  +}
  +
  +
  +bool AttributedUri::isMustUnderstand()
  +{
  +    return m_bMustUnderstand;
  +}
   
   IHeaderBlock * AttributedUri::toSoapHeaderBlock(IMessageData *pIMsg)
   {
   	IHandlerSoapSerializer* pISZ;
   	pIMsg->getSoapSerializer(&pISZ);
  -
  +   
   	IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock();
  -
  -	pIHeaderBlock->setLocalName(m_pachLocalName);
  +    pIHeaderBlock->setLocalName(m_pachLocalName);
       pIHeaderBlock->setUri(Constants.NS_URI_ADDRESSING);
  -		        
  -	printf("in the WsaHandler::Invoke : %s\n");
  -
  -	BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -	pBasicNode->setValue(m_pachUri);
  -	
  -	pIHeaderBlock->addChild(pBasicNode);
  +    
  +	BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                            NULL,NULL,NULL,m_pachUri);
  +    if(m_bMustUnderstand)
  +    {   
  +       // pIHeaderBlock->createAttribute(Constants.MUSTUNDERSTAND, 
  +       // NULL, Constants.NS_URI_SOAP_ENVELOPE, "1");
  +    }
  +    pIHeaderBlock->addChild(pBasicNode);
       
       return pIHeaderBlock;
   
  
  
  
  1.3       +11 -26    ws-axis/contrib/wsa4c/addressing/AttributedURI.hpp
  
  Index: AttributedURI.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/AttributedURI.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributedURI.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ AttributedURI.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -33,8 +33,8 @@
   #define __ATTRIBUTEDURI_OF_AXIS_INCLUDED__
   
   #include "Constants.hpp"
  -#include <axis/server/IHeaderBlock.hpp>
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/IHeaderBlock.hpp>
  +#include <axis/IMessageData.hpp>
   
   AXIS_CPP_NAMESPACE_USE
   
  @@ -43,33 +43,18 @@
   private:
       AxisChar * m_pachLocalName;
       AxisChar * m_pachUri;
  +    bool m_bMustUnderstand;
       
   public:
  -	/*
  -     * Constructor AttributedURI
  -     */
  -    AttributedUri(); 
  -
  -	/*
  -     * Constructor AttributedURI
  -     * @param uri 
  -     */
  -    AttributedUri(AxisChar * pachLocalName, AxisChar * pachUri);
  -
  -    /*Distructor
  -	 */
  -	~AttributedUri();
  -   
  -    void setUri(AxisChar * pUri);
  -
  +	AttributedUri(); 
  +    AttributedUri(const AxisChar * pachLocalName,const AxisChar * pachUri);
  +	~AttributedUri(); 
  +    void setUri(const AxisChar * pUri);
       AxisChar * getUri();
  -
  -    void setLocalName(AxisChar * pachLocalName);
  -
  +    void setLocalName(const AxisChar * pachLocalName);
       AxisChar * getLocalName();
  -
  -    virtual IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);
  -     
  -    
  +    void setMustUnderstand(bool bMustUnderstand);
  +    bool isMustUnderstand();
  +    IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);   
   };
   #endif
  
  
  
  1.3       +29 -4     ws-axis/contrib/wsa4c/addressing/Constants.cpp
  
  Index: Constants.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/Constants.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Constants.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ Constants.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -37,11 +37,15 @@
   Constants::Constants(){};
   Constants::~Constants(){};
   
  -AxisChar * Constants::NS_PREFIX_ADDRESSING = "wsa";
  +AxisChar * Constants::NS_URI_SOAP_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
  +
  +AxisChar * Constants::NS_PREFIX_SOAP_ENVELOPE = "SOAP-ENV";
   
   AxisChar * Constants::NS_URI_ADDRESSING="http://schemas.xmlsoap.org/ws/2003/03/addressing";
   
  -AxisChar * Constants::NS_URI_ANONYMOUS= *Constants::NS_URI_ADDRESSING + "/role/anonymous";
  +AxisChar * Constants::NS_PREFIX_ADDRESSING = "wsa";
  +
  +AxisChar * Constants::NS_URI_ANONYMOUS= "http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous";
   
   AxisChar * Constants::ENDPOINT_REFERENCE = "EndpointReference";
   
  @@ -75,7 +79,28 @@
   
   AxisChar * Constants::RECIPIENT = "Recipient";
   
  -AxisChar *  Constants::ENV_ADDRESSING_REQUEST_HEADERS ="org.apache.axis.message.addressing.REQUEST.HEADERS";
  +AxisChar * Constants::MUSTUNDERSTAND = "mustUnderstand";
  +
  +AxisChar * Constants::ENV_ADDRESSING_REQUEST_HEADERS = "org.apache.axis.message.addressing.REQUEST.HEADERS";
  +
  +AxisChar * Constants::ENV_ADDRESSING_RESPONSE_HEADERS = "org.apache.axis.message.addressing.RESPONSE.HEADERS";
  +
  +AxisChar * Constants::ENV_ADDRESSING_TO_URI = "addressing.to.URI";
  +
  +AxisChar * Constants::ENV_ADDRESSING_FROM_URI = "addressing.from.URI";
  +
  +AxisChar * Constants::ENV_ADDRESSING_ACTION_URI = "addressing.from.URI";
  +
  +AxisChar * Constants::ENV_ADDRESSING_REPLYTO_URI = "addressing.replyTo.URI";
  +
  +AxisChar * Constants::ENV_ADDRESSING_FAULTTO_URI = "addressing.faultTo.URI";
  + 
  +AxisChar * Constants::ENV_ADDRESSING_SET_MUST_UNDERSTAND = "addressing.setMustUnderstand";
  + 
  +AxisChar * Constants::ENV_ADDRESSING_SEND_REPLYTO = "addressing.sendReplyTo";      
  +  
  +AxisChar * Constants::ENV_ADDRESSING_REFERENCEPROPERTIES = "addressing.referenceproperties";
   
  -AxisChar *  Constants::ENV_ADDRESSING_RESPONSE_HEADERS ="org.apache.axis.message.addressing.RESPONSE.HEADERS";
  +AxisChar * Constants::FAULT_ACTION = "http://schemas.xmlsoap.org/ws/2004/03/addressing/fault";
   
  +AxisChar * Constants::NS_URI_ADDRESSING_04 = "http://schemas.xmlsoap.org/ws/2004/03/addressing";
  
  
  
  1.3       +17 -87    ws-axis/contrib/wsa4c/addressing/Constants.hpp
  
  Index: Constants.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/Constants.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Constants.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ Constants.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -33,116 +33,46 @@
   #define __WSACONSTANTS_OF_AXIS_INCLUDED__
   
   #include <string>
  -#include <axis/server/GDefine.hpp>
  +#include <axis/GDefine.hpp>
   class Constants
   {
   public:
   	Constants();
   	~Constants();
   
  -	/*
  -     * Field NS_PREFIX_ADDRESSING
  -     */
  -	static AxisChar * NS_PREFIX_ADDRESSING;
  -  
  -    /*
  -     * Field NS_URI_ADDRESSING
  -     */
  -    static AxisChar * NS_URI_ADDRESSING;
  -  
  -    /*
  -     * Field NS_URI_ANONYMOUS
  -     */
  +    static AxisChar * NS_URI_SOAP_ENVELOPE;
  +    static AxisChar * NS_PREFIX_SOAP_ENVELOPE;
  +    static AxisChar * NS_URI_ADDRESSING;    
  +    static AxisChar * NS_PREFIX_ADDRESSING;
   	static AxisChar * NS_URI_ANONYMOUS;
  -  
  -    /*
  -     * Field ENDPOINT_REFERENCE
  -     */
       static AxisChar * ENDPOINT_REFERENCE;
  -  
  -    /*
  -     * Field MESSAGE_ID
  -     */
   	static AxisChar * MESSAGE_ID;
  -  
  -    /*
  -     * Field RELATES_TO
  -     */
   	static AxisChar * RELATES_TO;
  -  
  -    /*
  -     * Field RELATIONSHIP_TYPE
  -     */
   	static AxisChar * RELATIONSHIP_TYPE;
  - 
  -    /*
  -     * Field ACTION
  -     */
   	static AxisChar * ACTION;
  -  
  -    /*
  -     * Field ADDRESS
  -     */
   	static AxisChar * ADDRESS;
  -  
  -    /*
  -     * Field REFERENCE_PROPERTIES
  -     */
   	static AxisChar * REFERENCE_PROPERTIES;
  -  
  -    /*
  -     * Field SERVICE_NAME
  -     */
       static AxisChar * SERVICE_NAME;
  -  
  -    /*
  -     * Field PORT_NAME
  -     */
   	static AxisChar * PORT_NAME;
  -  
  -    /*
  -     * Field PORT_TYPE
  -     */
       static AxisChar * PORT_TYPE;
  -  
  -    /*
  -     * Field RESPONSE
  -     */
   	static AxisChar * RESPONSE;
  - 
  -    /*
  -     * Field TO
  -     */
       static AxisChar * TO;
  - 
  -    /*
  -     * Field REPLY_TO
  -     */
       static AxisChar * REPLY_TO;
  - 
  -    /*
  -     * Field FAULT_TO
  -     */
       static AxisChar * FAULT_TO;
  - 
  -    /*
  -     * Field FROM
  -     */
   	static AxisChar * FROM;
  - 
  -    /*
  -     * Field RECIPIENT
  -     */
       static AxisChar * RECIPIENT;
  - 
  -    /*
  -     * Field ENV_ADDRESSING_REQUEST_HEADERS
  -     */
  -	static AxisChar * ENV_ADDRESSING_REQUEST_HEADERS;
  - 
  -    /*
  -     * Field ENV_ADDRESSING_RESPONSE_HEADERS
  -     */
  +    static AxisChar * MUSTUNDERSTAND;
  +    static AxisChar * ENV_ADDRESSING_REQUEST_HEADERS;
   	static AxisChar * ENV_ADDRESSING_RESPONSE_HEADERS;
  +	static AxisChar * ENV_ADDRESSING_TO_URI;
  +    static AxisChar * ENV_ADDRESSING_FROM_URI;
  +    static AxisChar * ENV_ADDRESSING_ACTION_URI;
  +    static AxisChar * ENV_ADDRESSING_REPLYTO_URI;
  +    static AxisChar * ENV_ADDRESSING_FAULTTO_URI;
  +    static AxisChar * ENV_ADDRESSING_SET_MUST_UNDERSTAND;
  +    static AxisChar * ENV_ADDRESSING_SEND_REPLYTO;
  +    static AxisChar * ENV_ADDRESSING_REFERENCEPROPERTIES;
  +    static AxisChar * FAULT_ACTION; 
  +    static AxisChar * NS_URI_ADDRESSING_04; 
   };
   #endif
  
  
  
  1.3       +127 -79   ws-axis/contrib/wsa4c/addressing/EndpointReferenceType.cpp
  
  Index: EndpointReferenceType.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/EndpointReferenceType.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EndpointReferenceType.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ EndpointReferenceType.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -31,32 +31,78 @@
   
   #include "EndpointReferenceType.hpp"
    
  -EndpointReferenceType::EndpointReferenceType(AxisChar* pachLocalName)
  +EndpointReferenceType::EndpointReferenceType(const AxisChar* pachLocalName)
   {
  -    m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  -    strcpy(m_pachLocalName,pachLocalName);
  -	m_pAddress = NULL;
  -    m_pRefprops = NULL;
  -    m_pPortType = NULL;
  -    m_pServiceName = NULL;
  -    
  -  
  +	init();
  +    setLocalName(pachLocalName);   
   }
     	  
  -EndpointReferenceType::EndpointReferenceType(AxisChar* pachLocalName,AxisChar * pachAddress)
  +EndpointReferenceType::EndpointReferenceType(const AxisChar* pachLocalName,const AxisChar * pachAddress)
   {
  -    m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  -    strcpy(m_pachLocalName,pachLocalName);
  -    m_pAddress = new Address(pachAddress);
  -	m_pRefprops = NULL;
  +    init();
  +    setLocalName(pachLocalName);
  +    setAddress(pachAddress);   
  +}
  +
  +EndpointReferenceType::EndpointReferenceType(EndpointReferenceType * pEndpoint)
  +{
  +    setAddress(pEndpoint->getAddress()->getUri());
  +    setPortType(pEndpoint->getPortType());
  +    setServiceName(pEndpoint->getServiceName());
  +    setProperties(new ReferenceProperties(pEndpoint->getProperties()));
  +       
  +}
  +
  +EndpointReferenceType::EndpointReferenceType(IHeaderBlock * pIHeaderBlock)
  +{  
  +            
  +    init();
  +    setLocalName(pIHeaderBlock->getLocalName());   
  +    for(int i=0; i<pIHeaderBlock->getNoOfChildren(); i++)
  +    {
  +                
  +        BasicNode * pChild = pIHeaderBlock->getFirstChild();//getChild(i);
  +        
  +        if(strcmp(pChild->getLocalName(),Constants.ADDRESS)==0)
  +        {
  +            m_pAddress = new Address(pChild->getFirstChild()->getValue());
  +        }
  +
  +        if(strcmp(pChild->getLocalName(),Constants.REFERENCE_PROPERTIES)==0)
  +        {
  +            m_pRefprops = new ReferenceProperties();
  +                     
  +            for(int j=0; j<pChild->getNoOfChildren(); j++)
  +            {
  +                BasicNode * pProp = pChild->getChild(j);
  +                //m_pRefprops->setPrefixUri(pProp->getPrefix());
  +                m_pRefprops->addProperty(pProp->getLocalName(),pChild->getFirstChild()->getValue());
  +            }
  +        }
  +        if(strcmp(pChild->getLocalName(),Constants.SERVICE_NAME)==0)
  +        {
  +            m_pServiceName = new ServiceNameType(pChild->getFirstChild()->getValue(),NULL);
  +        }
  +        if(strcmp(pChild->getLocalName(),Constants.PORT_TYPE)==0)
  +        {
  +            m_pPortType = new PortType(pChild->getFirstChild()->getValue());
  +        }    
  +    }
  +}
  +
  +void EndpointReferenceType::init()
  +{
  +    m_pAddress = NULL;
  +    m_pRefprops = NULL;
       m_pPortType = NULL;
       m_pServiceName = NULL;
  -    
  +    m_pachLocalName = NULL;
   }
   
   EndpointReferenceType::~EndpointReferenceType()
   {
  -    free(m_pachLocalName);
  +    if(m_pachLocalName!=NULL)
  +        delete(m_pachLocalName);
   }
     
   AttributedUri * EndpointReferenceType::getAddress()
  @@ -64,7 +110,7 @@
       return m_pAddress;
   }
    
  -void EndpointReferenceType::setAddress(AxisChar * pachAddress)
  +void EndpointReferenceType::setAddress(const AxisChar * pachAddress)
   {
       m_pAddress = new Address(pachAddress);
   }
  @@ -76,7 +122,7 @@
    
   void EndpointReferenceType::setPortType(AttributedQName * portType)
   {
  -    m_pPortType = portType;
  +    m_pPortType = new PortType(Constants.PORT_TYPE,portType->getUri());
   }
    
   ReferenceProperties * EndpointReferenceType::getProperties()
  @@ -86,7 +132,7 @@
    
   void EndpointReferenceType::setProperties(ReferenceProperties * pRefprops)
   {
  -    m_pRefprops = pRefprops;
  +    m_pRefprops = new ReferenceProperties(pRefprops);
   }
    
   ServiceNameType * EndpointReferenceType::getServiceName()
  @@ -96,92 +142,94 @@
   
   void EndpointReferenceType::setServiceName(ServiceNameType * pServiceName)
   {
  -    m_pServiceName = pServiceName;
  +    m_pServiceName = new ServiceNameType(Constants.SERVICE_NAME,pServiceName->getUri(),NULL);
   }
   
  -IHeaderBlock * EndpointReferenceType::toSoapHeaderBlock(IMessageData *pIMsg)
  +void EndpointReferenceType::setMustUnderstand(bool bMustUnderstand)
   {
  +    m_bMustUnderstand = bMustUnderstand;
  +}
  +
  +bool EndpointReferenceType::isMustUnderstand()
  +{
  +    return m_bMustUnderstand;
  +}
  +
  +IHeaderBlock * EndpointReferenceType::toSoapHeaderBlock(IMessageData *pIMsg)
  +{   
       IHandlerSoapSerializer* pISZ;
   	pIMsg->getSoapSerializer(&pISZ);
   
  -	IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock();
  -
  -	pIHeaderBlock->setLocalName(m_pachLocalName);
  +    IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock();
  +    pIHeaderBlock->setLocalName(m_pachLocalName);
   	pIHeaderBlock->setUri(Constants.NS_URI_ADDRESSING);
  -   		        
  -	printf("in the WsaHandler::Invoke : %s\n");	
   
  -    if(NULL != m_pAddress)
  -    {
  -        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE);
  -        pElementNode->setLocalName(m_pAddress->getLocalName());
  -        pElementNode->setPrefix(Constants.NS_PREFIX_ADDRESSING);
  -
  -        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -        pCharacterNode->setValue(m_pAddress->getUri());
  +    if(m_pAddress != NULL && m_pAddress->getUri() != NULL)
  +    {    
  +        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE,  
  +                                   m_pAddress->getLocalName(), Constants.NS_PREFIX_ADDRESSING,Constants.NS_URI_ADDRESSING, 
  +                                   NULL);
  +        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                                   NULL,NULL,NULL, m_pAddress->getUri());
           pElementNode->addChild(pCharacterNode);
  -        
  -        pIHeaderBlock->addChild(pElementNode);  
  +		pIHeaderBlock->addChild(pElementNode);  
       }
  -
  -    if(NULL != m_pRefprops)
  +   
  +    if(m_pRefprops != NULL)
       {
  -        BasicNode * parentNode = pIHeaderBlock->createChild(ELEMENT_NODE);
  -        parentNode->setLocalName(m_pRefprops->getLocalName());
  -        parentNode->setPrefix(Constants.NS_PREFIX_ADDRESSING);
  -
  -        map<AxisChar *,AxisChar *>::iterator prop = m_pRefprops->getProperties().begin();
  -
  -	    while(prop != m_pRefprops->getProperties().end())
  -	    {		
  -            BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE);
  +        BasicNode * parentNode = pIHeaderBlock->createChild(ELEMENT_NODE,  
  +                                   m_pRefprops->getLocalName(), Constants.NS_PREFIX_ADDRESSING,Constants.NS_URI_ADDRESSING, 
  +                                   NULL); 
  +        map<AxisChar *,AxisChar *,ReferenceProperties::ltstr>  refProps =  m_pRefprops->getProperties();
  +        map<AxisChar *,AxisChar *,ReferenceProperties::ltstr>::iterator prop =refProps.begin();
  +        while(prop != refProps.end())
  +	    {          
  +            BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE,  
  +                                   (*prop).first,Constants.NS_PREFIX_ADDRESSING,Constants.NS_URI_ADDRESSING, 
  +                                   NULL); 
              // if(strlen(m_pRefprops->getPrefix())!=0)
  -           //     pElementNode->setPrefix(m_pRefprops->getPrefix);
  -            pElementNode->setLocalName((*prop).first);
  -        
  -            BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -		    pCharacterNode->setValue(prop->second);
  +           //     pElementNode->setPrefix(m_pRefprops->getPrefix);            
  +            BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                                         NULL,NULL,NULL,prop->second);
               pElementNode->addChild(pCharacterNode);
               parentNode->addChild(pElementNode);
   		    prop++;
  -	    }
  -        
  +        }
           pIHeaderBlock->addChild(parentNode);
   	
       }
  -    
  -    if(NULL != m_pPortType)
  +   
  +    if(m_pPortType != NULL)
       {
  -        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE);
  -        pElementNode->setLocalName(m_pPortType->getLocalName());
  -        pElementNode->setPrefix(Constants.NS_PREFIX_ADDRESSING);
  -
  -        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -        pCharacterNode->setValue(m_pPortType->getQname());
  -        pElementNode->addChild(pCharacterNode);
  -        
  +        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE,
  +                                   m_pPortType->getLocalName(),NULL,Constants.NS_URI_ADDRESSING,
  +                                   NULL);       
  +        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                                                    NULL,NULL,NULL,m_pPortType->getQname());
  +        pElementNode->addChild(pCharacterNode);       
           pIHeaderBlock->addChild(pElementNode); 
       }
   
  -    if(NULL != m_pServiceName)
  +    if( m_pServiceName != NULL)
       {
  -        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE);
  -        pElementNode->setLocalName(m_pServiceName->getLocalName());
  -        pElementNode->setPrefix(Constants.NS_PREFIX_ADDRESSING);
  -
  +		BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE,
  +                                   m_pServiceName->getLocalName(),NULL,Constants.NS_URI_ADDRESSING,
  +                                   NULL);
           if(strlen(m_pServiceName->getPortName())!=0)
  -        {
               pElementNode->createAttribute(Constants.PORT_NAME,"",m_pServiceName->getPortName());
  -             
  -        }
  -        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -        pCharacterNode->setValue(m_pPortType->getQname());
  +              
  +        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                                                    NULL,NULL,NULL,m_pServiceName->getQname());;
           pElementNode->addChild(pCharacterNode);
  -        
           pIHeaderBlock->addChild(pElementNode); 
       }
  -        
  -    return pIHeaderBlock;
  -    
  -  
  +    return pIHeaderBlock; 
  +}
  +
  +void EndpointReferenceType::setLocalName(const AxisChar * pachLocalName)
  +{
  +    if(m_pachLocalName != NULL)
  +        delete(m_pachLocalName);
  +    m_pachLocalName = new AxisChar(strlen(pachLocalName)+1);
  +    strcpy(m_pachLocalName,pachLocalName);
   }
  
  
  
  1.3       +43 -96    ws-axis/contrib/wsa4c/addressing/EndpointReferenceType.hpp
  
  Index: EndpointReferenceType.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/EndpointReferenceType.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EndpointReferenceType.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ EndpointReferenceType.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -39,6 +39,7 @@
   #include "ServiceNameType.hpp"
   #include "AttributedQName.hpp"
   #include "AttributedUri.hpp"
  +#include <axis/IHeaderBlock.hpp>
     
     /***
      * <p>The following schema fragment specifies the expected content contained within this java content object. (defined at http://schemas.xmlsoap.org/ws/2003/03/addressing/ line 46)
  @@ -61,105 +62,51 @@
      * 
      */
   class EndpointReferenceType
  -{
  -     
  -	 private:
  -      /***
  -       * Field address
  -       */
  -		 AttributedUri * m_pAddress;
  +{    
  +private:
  +    /***
  +     * Field address
  +     */
  +	AttributedUri * m_pAddress;
  +    /***
  +     * Field properties
  +     */
  +    ReferenceProperties * m_pRefprops;  
  +    /***
  +     * Field portType
  +     */
  +    AttributedQName * m_pPortType; 
  +    /***
  +     * Field serviceName
  +     */
  +    ServiceNameType * m_pServiceName;
  +    /***
  +     * Field localname
  +     */
  +    AxisChar * m_pachLocalName;
   
  -      /***
  -       * Field properties
  -       */
  -         ReferenceProperties * m_pRefprops;
  -  
  -      /***
  -       * Field portType
  -       */
  -         AttributedQName * m_pPortType;
  -  
  -      /***
  -       * Field serviceName
  -       */
  -         ServiceNameType * m_pServiceName;
  -
  -         AxisChar * m_pachLocalName;
  +    bool m_bMustUnderstand;
     
  +public:
       
  -	 public:
  -
  -         EndpointReferenceType(AxisChar* pachLocalName);
  -  	  
  -      /***
  -       * Constructor EndpointReferenceType
  -       * 
  -       * @param address 
  -       */
  -         EndpointReferenceType(AxisChar* pachLocalName,AxisChar * pachAddress);
  -  
  -         ~EndpointReferenceType();
  -      
  -      /***
  -       * Method getAddress
  -       * 
  -       * @return 
  -       */
  -         AttributedUri * getAddress();
  - 
  -      /***
  -       * Method setAddress
  -       * 
  -       * @param address 
  -       */
  -         void setAddress(AxisChar * pachAddress);
  - 
  -      /***
  -       * Method getPortType
  -       * 
  -       * @return 
  -       */
  -         AttributedQName * getPortType();
  - 
  -      /***
  -       * Method setPortType
  -       * 
  -       * @param portType 
  -       */
  -         void setPortType(AttributedQName * portType);
  - 
  -      /***
  -       * Method getProperties
  -       * 
  -       * @return 
  -       */
  -         ReferenceProperties * getProperties();
  - 
  -      /***
  -       * Method setProperties
  -       * 
  -       * @param properties 
  -       */
  -         void setProperties(ReferenceProperties * pRefprops);
  - 
  -      /***
  -       * Method getServiceName
  -       * 
  -       * @return 
  -       */
  -        ServiceNameType * getServiceName();
  - 
  -      /***
  -       * Method setServiceName
  -       * 
  -       * @param serviceName 
  -       */
  -        void setServiceName(ServiceNameType * pServiceName);
  -
  -        
  -        IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);
  -
  -         
  +    EndpointReferenceType(const AxisChar* pachLocalName); 	
  +    EndpointReferenceType(const AxisChar* pachLocalName,const AxisChar * pachAddress);
  +    EndpointReferenceType(EndpointReferenceType * pEndpoint);
  +    EndpointReferenceType(IHeaderBlock * pIHeaderBlock);  
  +    ~EndpointReferenceType();      
  +    void init();
  +    AttributedUri * getAddress();
  +    void setAddress(const AxisChar * pachAddress); 
  +    AttributedQName * getPortType();
  +    void setPortType(AttributedQName * portType);
  +    ReferenceProperties * getProperties(); 
  +    void setProperties(ReferenceProperties * pRefprops);
  +    ServiceNameType * getServiceName(); 
  +    void setServiceName(ServiceNameType * pServiceName);
  +    void setMustUnderstand(bool bMustUnderstand);
  +    bool isMustUnderstand();
  +    virtual IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);      
  +    void setLocalName(const AxisChar * pachLocalName);
    };
   
   #endif
  
  
  
  1.3       +4 -0      ws-axis/contrib/wsa4c/addressing/FaultTo.cpp
  
  Index: FaultTo.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/FaultTo.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FaultTo.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ FaultTo.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -39,6 +39,10 @@
   :EndpointReferenceType(Constants.FAULT_TO,address)
   {
   }
  +FaultTo::FaultTo(IHeaderBlock * pIHeaderBlock)
  +:EndpointReferenceType(pIHeaderBlock)
  +{
  +}
     
   
         
  
  
  
  1.3       +3 -7      ws-axis/contrib/wsa4c/addressing/FaultTo.hpp
  
  Index: FaultTo.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/FaultTo.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FaultTo.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ FaultTo.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -35,13 +35,9 @@
   
   class FaultTo:public EndpointReferenceType 
   {
  -      /***
  -       * Constructor FaultTo
  -       * 
  -       * @param address 
  -       */
   public:
       FaultTo();
  -    FaultTo(AxisChar * address);   
  -  };
  +    FaultTo(AxisChar * pachAddress);   
  +    FaultTo(IHeaderBlock * pIHeaderBlock);
  +};
   #endif
  \ No newline at end of file
  
  
  
  1.3       +6 -2      ws-axis/contrib/wsa4c/addressing/From.cpp
  
  Index: From.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/From.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- From.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ From.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -35,8 +35,12 @@
   :EndpointReferenceType(Constants.FROM)
   {
   }
  -From::From(AxisChar * address)
  -:EndpointReferenceType(Constants.FROM,address)
  +From::From(AxisChar * pachAddress)
  +:EndpointReferenceType(Constants.FROM,pachAddress)
  +{
  +}
  +From::From(IHeaderBlock * pIHeaderBlock)
  +:EndpointReferenceType(pIHeaderBlock)
   {
   }
     
  
  
  
  1.3       +2 -6      ws-axis/contrib/wsa4c/addressing/From.hpp
  
  Index: From.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/From.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- From.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ From.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -35,14 +35,10 @@
   
   class From:public EndpointReferenceType 
   {
  -      /***
  -       * Constructor From
  -       * 
  -       * @param address 
  -       */
   public:
       From();
  -    From(AxisChar * address);   
  +    From(AxisChar * pachAddress);  
  +    From(IHeaderBlock * pIHeaderBlock);
   };
   
   #endif
  
  
  
  1.3       +1 -1      ws-axis/contrib/wsa4c/addressing/MessageID.cpp
  
  Index: MessageID.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/MessageID.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageID.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ MessageID.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -31,7 +31,7 @@
   
   #include "MessageID.hpp" 	
   
  -MessageId::MessageId(AxisChar * pachUri)
  +MessageId::MessageId(const AxisChar * pachUri)
   :AttributedUri(Constants.MESSAGE_ID,pachUri)
   {
   }
  
  
  
  1.3       +4 -9      ws-axis/contrib/wsa4c/addressing/MessageID.hpp
  
  Index: MessageID.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/MessageID.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageID.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ MessageID.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -36,15 +36,10 @@
   #include <string>
   using namespace std;
   
  -class MessageId:public AttributedUri {
  +class MessageId:public AttributedUri 
  +{
   public:
  -    /*
  -     * Constructor MessageId
  -     * 
  -     * @param uri 
  -     */
  -	MessageId(AxisChar * pachUri);	
  -
  -  };
  +	MessageId(const AxisChar * pachUri);	
  +};
   
   #endif
  
  
  
  1.3       +5 -0      ws-axis/contrib/wsa4c/addressing/PortType.cpp
  
  Index: PortType.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/PortType.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortType.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ PortType.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -41,6 +41,11 @@
   {
   }
   
  +PortType::PortType(const AxisChar* pachQname)
  +:AttributedQName(pachQname)
  +{
  +}
  +
   IHeaderBlock * PortType::toSoapHeaderBlock(IMessageData *pIMsg)
   {
      	IHandlerSoapSerializer* pISZ;
  
  
  
  1.3       +7 -6      ws-axis/contrib/wsa4c/addressing/PortType.hpp
  
  Index: PortType.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/PortType.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortType.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ PortType.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -33,9 +33,9 @@
   #define __PORTTYPE_OF_AXIS_INCLUDED__
   
   #include "AttributedQName.hpp"
  -#include <axis/server/BasicNode.hpp>
  -#include <axis/server/IHeaderBlock.hpp>
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/BasicNode.hpp>
  +#include <axis/IHeaderBlock.hpp>
  +#include <axis/IMessageData.hpp>
   
   AXIS_CPP_NAMESPACE_USE
   
  @@ -55,11 +55,12 @@
     * </pre>
     * 
     */
  -class PortType:public AttributedQName{
  -      
  +class PortType:public AttributedQName
  +{      
   public:
       PortType();
  -	PortType(const AxisChar* pLocalName, const AxisChar* pUri);
  +	PortType(const AxisChar* pachLocalName, const AxisChar* pachUri);
  +    PortType(const AxisChar* pachQname);
   	IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);   
   
   };
  
  
  
  1.3       +126 -45   ws-axis/contrib/wsa4c/addressing/ReferenceProperties.cpp
  
  Index: ReferenceProperties.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/ReferenceProperties.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReferenceProperties.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ ReferenceProperties.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -34,25 +34,85 @@
       
   ReferenceProperties::ReferenceProperties()
   {
  +
  +}
  +ReferenceProperties::ReferenceProperties(IHeaderBlock * pIHParent)
  +{
  +	if(pIHParent!=NULL)
  +	{
  +		for(int i=0; i<pIHParent->getNoOfChildren(); i++)
  +		{
  +			BasicNode * pBasicNode = (BasicNode*) pIHParent->getChild(i);
  +			if(pBasicNode!=NULL)
  +			{
  +				AxisChar * pachLocalName = (AxisChar*)pBasicNode->getLocalName();
  +				if(pachLocalName!=NULL)
  +					if(pBasicNode->getFirstChild!=NULL && pBasicNode->getFirstChild()->getValue()!=NULL)
  +					{
  +						m_refProps[pachLocalName] = (AxisChar*)pBasicNode->getFirstChild()->getValue();
  +					}
  +			}
  +		}
  +	}
   }
   
  -ReferenceProperties::ReferenceProperties(AxisChar * pachLocalName)
  +ReferenceProperties::ReferenceProperties(const AxisChar * pachLocalName)
   {
  -	m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  +	m_pachLocalName = (AxisChar*)malloc(strlen(pachLocalName)+1);
       strcpy(m_pachLocalName, pachLocalName);
  +    
  +    m_pachUri = NULL;
  +}
   
  -    m_pachPrefix = '\0';
  +ReferenceProperties::ReferenceProperties(ReferenceProperties * pRefprops)
  +{
  +    map<AxisChar *,AxisChar *,ltstr> tempmap = pRefprops->getProperties();
  +    map<AxisChar *,AxisChar *,ltstr>::iterator itCurrentItem 
  +        = tempmap.begin();
  +    while (itCurrentItem != tempmap.end ())
  +    { 
  +        m_refProps[(*itCurrentItem).first] = itCurrentItem->second;       
  +        itCurrentItem++;
  +    }
  +
  +    if(pRefprops->getLocalName() != NULL)
  +    {
  +        m_pachLocalName = (AxisChar*)malloc(strlen(pRefprops->getLocalName()));
  +        strcpy(m_pachLocalName,pRefprops->getLocalName());
  +    }
  +   /* 
  +    if(pRefprops->getPrefixUri() != NULL)
  +    {
  +        m_pachUri = (AxisChar*)malloc(strlen(pRefprops->getPrefixUri()));
  +        strcpy(m_pachUri,pRefprops->getPrefixUri());
  +    }*/    
   }
  +
   ReferenceProperties::~ReferenceProperties()
   {
  -    free(m_pachPrefix);
  -	free(m_pachLocalName);
  +    if(m_pachUri!=NULL)
  +        free(m_pachUri);
  +    if(m_pachLocalName != NULL)
  +	    free(m_pachLocalName);
  +	map <AxisChar*,AxisChar*, ltstr >::iterator itCurrentItem =
  +        m_refProps.begin ();
  +
  +    while (itCurrentItem != m_refProps.end ())
  +    {
  +        delete [] (*itCurrentItem).first;
  +        delete [] itCurrentItem->second;
  +
  +        itCurrentItem++;
  +    }
  +
  +    m_refProps.clear ();
   }
   
  -void ReferenceProperties::setLocalName(AxisChar * pachLocalName)
  +void ReferenceProperties::setLocalName(const AxisChar * pachLocalName)
   {
  -    free(m_pachLocalName);
  -    m_pachLocalName = (AxisChar*) malloc(strlen(pachLocalName)+1);
  +    if(m_pachLocalName!=NULL)
  +        free(m_pachLocalName);
  +    m_pachLocalName = (AxisChar*)malloc(strlen(pachLocalName)+1);
       strcpy(m_pachLocalName, pachLocalName);
   }
   
  @@ -61,28 +121,17 @@
   	return m_pachLocalName;
   }
   
  -void ReferenceProperties::setPrefix(AxisChar * pachPrefix)
  +void ReferenceProperties::setPrefixUri(const AxisChar * pachUri)
   {
  -    free(m_pachPrefix);
  -    m_pachPrefix = (AxisChar*) malloc(strlen(pachPrefix));
  -    strcpy(m_pachPrefix,pachPrefix);
  +    if(m_pachUri!=NULL)
  +        free(m_pachUri);
  +    m_pachUri = (AxisChar*)malloc(strlen(pachUri)+1);
  +    strcpy(m_pachUri,pachUri);
   }
   
  -AxisChar * ReferenceProperties::getPrefix()
  +AxisChar * ReferenceProperties::getPrefixUri()
   {
  -    return m_pachPrefix;
  -}
  -
  -int ReferenceProperties::setProperty(AxisChar * pachName, AxisChar * pachValue)
  -{
  -    AxisChar* pachTmpName = (AxisChar*) malloc (strlen (pachName) + 1);
  -    strcpy (pachTmpName, pachName);
  -    AxisChar* pachTmpValue = (AxisChar*) malloc (strlen (pachValue) + 1);
  -    strcpy (pachTmpValue, pachValue);
  -
  -    m_refProps[pachTmpName] = pachTmpValue;
  -
  -    return AXIS_SUCCESS;
  +    return m_pachUri;
   }
   
   const AxisChar* ReferenceProperties::getProperty (AxisChar* pachName)
  @@ -95,7 +144,20 @@
       return "";
   }
   
  -map<AxisChar*,AxisChar*> ReferenceProperties::getProperties()
  +void ReferenceProperties::addProperty(const AxisChar* pachLocalName,const AxisChar* pachValue)
  +{
  +    if(pachLocalName!=NULL && pachValue != NULL)
  +    {      
  +        AxisChar* pachTmpName = (AxisChar*)malloc(strlen (pachLocalName) + 1);
  +        strcpy (pachTmpName, pachLocalName);
  +        AxisChar* pachTmpValue = (AxisChar*)malloc(strlen (pachValue) + 1);
  +        strcpy (pachTmpValue, pachValue);
  +       
  +		m_refProps[pachTmpName] = pachTmpValue;        
  +    }
  +}
  +
  +map<AxisChar*,AxisChar*,ReferenceProperties::ltstr>  ReferenceProperties::getProperties()
   {
       return m_refProps;
   }
  @@ -105,40 +167,59 @@
   	return toSoapHeaderBlock(pIMsg,m_pachLocalName);
   }
   
  -IHeaderBlock * ReferenceProperties::toSoapHeaderBlock(IMessageData *pIMsg, AxisChar* pName)
  +IHeaderBlock * ReferenceProperties::toSoapHeaderBlock(IMessageData *pIMsg,const AxisChar* pName)
   {
   	IHandlerSoapSerializer* pISZ;
   	pIMsg->getSoapSerializer(&pISZ);
  -//	m_children = pIMsg->getReferenceProperties();
  -	//For testing
  -	m_refProps["L1"] = "Val1";
  -	m_refProps["L2"] = "Val2";
  -	m_refProps["L3"] = "Val3";
   
   	IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock();
   
   	pIHeaderBlock->setLocalName(pName);
   	pIHeaderBlock->setUri(Constants.NS_URI_ADDRESSING);
      		        
  -	printf("in the WsaHandler::Invoke : %s\n");	
  -
  -    map<AxisChar *,AxisChar *>::iterator prop = m_refProps.begin();
  +	map<AxisChar *,AxisChar *,ltstr>::iterator itCurrentItem = m_refProps.begin();
   
  -	while(prop != m_refProps.end())
  -	{		
  -        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE);
  -        pElementNode->setLocalName((*prop).first);
  +	while(itCurrentItem != m_refProps.end())
  +	{	
  +        BasicNode * pElementNode = pIHeaderBlock->createChild(ELEMENT_NODE,  
  +                                   (*itCurrentItem).first, NULL,Constants.NS_URI_ADDRESSING, 
  +                                   NULL);
  +        
  +        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                                   NULL,NULL,NULL, itCurrentItem->second);
           
  -        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -		pCharacterNode->setValue(prop->second);
           pElementNode->addChild(pCharacterNode);
  -
  -
           pIHeaderBlock->addChild(pElementNode);
  -		prop++;
  +
  +		itCurrentItem++;
   	}
   	
       return pIHeaderBlock;
   	
   }
   
  +void ReferenceProperties::toSoapHeaders(IMessageData *pIMsg)
  +{
  +    IHandlerSoapSerializer* pISZ;
  +	pIMsg->getSoapSerializer(&pISZ);	
  +
  +    map<AxisChar *,AxisChar *,ltstr>::iterator itCurrentItem = m_refProps.begin();
  +
  +	while(itCurrentItem != m_refProps.end())
  +	{	
  +        IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock();
  +
  +	    pIHeaderBlock->setLocalName((*itCurrentItem).first);
  +        if(m_pachUri != NULL)
  +            pIHeaderBlock->setUri(m_pachUri);
  +	       		        
  +        BasicNode * pCharacterNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  +		pCharacterNode->setValue(itCurrentItem->second);
  +        pIHeaderBlock->addChild(pCharacterNode);
  +
  +		itCurrentItem++;
  +	}
  +	
  +
  +}
  +
  
  
  
  1.3       +25 -17    ws-axis/contrib/wsa4c/addressing/ReferenceProperties.hpp
  
  Index: ReferenceProperties.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/ReferenceProperties.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReferenceProperties.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ ReferenceProperties.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -34,35 +34,43 @@
   
   #include "Constants.hpp"
   #include <map>
  -#include <axis/server/BasicNode.hpp>
  -#include <axis/server/IHeaderBlock.hpp>
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/BasicNode.hpp>
  +#include <axis/IHeaderBlock.hpp>
  +#include <axis/IMessageData.hpp>
   
   AXIS_CPP_NAMESPACE_USE
   
   class ReferenceProperties
  -{
  +{   
   private:
  +    struct ltstr
  +	{
  +		bool operator()(const char* s1, const char* s2) const
  +		{
  +		    return strcmp(s1, s2) < 0;
  +		}
  +	};	
   	int iNoOfChildren;
  -    map <AxisChar*, AxisChar*> m_refProps;
  -    AxisChar* m_pachPrefix;
  -    AxisChar* m_pachLocalName;
  -    
  -public:
  +    map <AxisChar*,AxisChar*,ltstr> m_refProps;
  +    AxisChar* m_pachUri;
  +    AxisChar* m_pachLocalName;  
   
  +public:    
   	ReferenceProperties();
  -	ReferenceProperties(AxisChar * pachLocalName);
  +    ReferenceProperties(ReferenceProperties * pRefprops);
  +	ReferenceProperties(IHeaderBlock * pIHParent);
  +	ReferenceProperties(const AxisChar * pachLocalName);
   	~ReferenceProperties();
  -	void setLocalName(AxisChar * pachLocalName);
  +	void setLocalName(const AxisChar * pachLocalName);
   	AxisChar * getLocalName();
  -    void setPrefix(AxisChar * pachPrefix);
  -    AxisChar * getPrefix();
  -	int setProperty(AxisChar * pName, AxisChar * pValue);
  +    void setPrefixUri(const AxisChar * pachUri);
  +    AxisChar * getPrefixUri();
   	const AxisChar* getProperty (AxisChar* pachName);
  -    map<AxisChar*,AxisChar*> getProperties();
  +    map<AxisChar*,AxisChar*,ltstr> getProperties();
  +	void addProperty(const AxisChar * pachLocalName,const AxisChar * pachValue);
   	IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg); 
  -    IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg, AxisChar* pName); 
  -
  +    IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg,const AxisChar* pName); 
  +    void toSoapHeaders(IMessageData *pIMsg);  
   };
   
   #endif
  \ No newline at end of file
  
  
  
  1.3       +6 -9      ws-axis/contrib/wsa4c/addressing/RelatesTo.cpp
  
  Index: RelatesTo.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/RelatesTo.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RelatesTo.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ RelatesTo.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -41,6 +41,7 @@
   RelatesTo::RelatesTo(AxisChar* pachUri)
   :AttributedUri(Constants.RELATES_TO,pachUri)
   {
  +    m_pRelationshipType = NULL;
   }
   
   void RelatesTo::setRelationshipType(RelationshipType * pRelationshipType)
  @@ -61,21 +62,17 @@
   
   IHeaderBlock * RelatesTo::toSoapHeaderBlock(IMessageData *pIMsg)
   {
  -   IHandlerSoapSerializer* pISZ;
  +    FILE * f = fopen("log4.out","w");
  +    IHandlerSoapSerializer* pISZ;
   	pIMsg->getSoapSerializer(&pISZ);
  -
  -	IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock();
       
  -	pIHeaderBlock->setLocalName(getLocalName());
  -    pIHeaderBlock->setUri(Constants.NS_URI_ADDRESSING);
  +	IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock(getLocalName(),Constants.NS_URI_ADDRESSING);
   
       if(m_pRelationshipType != NULL)
           pIHeaderBlock->createAttribute(Constants.RELATIONSHIP_TYPE,"",m_pRelationshipType->getUri());
   		        
  -	printf("in the WsaHandler::Invoke : %s\n");
  -
  -	BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE);
  -	pBasicNode->setValue(getUri());
  +	BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE,  
  +                            NULL,NULL,NULL,getUri());
   	
   	pIHeaderBlock->addChild(pBasicNode);
       
  
  
  
  1.3       +0 -6      ws-axis/contrib/wsa4c/addressing/RelatesTo.hpp
  
  Index: RelatesTo.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/RelatesTo.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RelatesTo.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ RelatesTo.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -38,12 +38,6 @@
   
   class RelatesTo:AttributedUri{
   public:
  -    /***
  -     * Constructor Adress
  -     * 
  -     * @param uri 
  -     */
  -
       RelatesTo();
       ~RelatesTo();
       RelatesTo(AxisChar* pachUri);
  
  
  
  1.3       +5 -5      ws-axis/contrib/wsa4c/addressing/RelationshipType.hpp
  
  Index: RelationshipType.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/RelationshipType.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RelationshipType.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ RelationshipType.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -33,14 +33,14 @@
   #define __RELATIONSHIP_TYPE_OF_AXIS_INCLUDED__
   
   #include "AttributedQName.hpp"
  -#include <axis/server/BasicNode.hpp>
  -#include <axis/server/IHeaderBlock.hpp>
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/BasicNode.hpp>
  +#include <axis/IHeaderBlock.hpp>
  +#include <axis/IMessageData.hpp>
   
   AXIS_CPP_NAMESPACE_USE
    
  -class RelationshipType:public AttributedQName{
  -      
  +class RelationshipType:public AttributedQName
  +{      
   public:
       RelationshipType();
   	RelationshipType(const AxisChar* pachLocalName, const AxisChar* pachUri);
  
  
  
  1.3       +4 -0      ws-axis/contrib/wsa4c/addressing/ReplyTo.cpp
  
  Index: ReplyTo.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/ReplyTo.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReplyTo.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ ReplyTo.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -39,6 +39,10 @@
   :EndpointReferenceType(Constants.REPLY_TO,address)
   {
   }
  +ReplyTo::ReplyTo(IHeaderBlock * pIHeaderBlock)
  +:EndpointReferenceType(pIHeaderBlock)
  +{
  +}
     
   
         
  
  
  
  1.3       +1 -5      ws-axis/contrib/wsa4c/addressing/ReplyTo.hpp
  
  Index: ReplyTo.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/ReplyTo.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReplyTo.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ ReplyTo.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -35,13 +35,9 @@
   
   class ReplyTo:public EndpointReferenceType 
   {
  -      /***
  -       * Constructor ReplyTo
  -       * 
  -       * @param address 
  -       */
   public:
       ReplyTo();
       ReplyTo(AxisChar * address);   
  +    ReplyTo(IHeaderBlock * pIHeaderBlock);
     };
   #endif
  \ No newline at end of file
  
  
  
  1.3       +19 -13    ws-axis/contrib/wsa4c/addressing/ServiceNameType.cpp
  
  Index: ServiceNameType.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/ServiceNameType.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServiceNameType.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ ServiceNameType.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -34,20 +34,30 @@
   
   ServiceNameType::ServiceNameType()
   {
  -	m_pachPortName = "\0";
  +	m_pachPortName = NULL;
   }
   ServiceNameType::~ServiceNameType()
   {
  -	free(m_pachPortName);
  +    if(m_pachPortName != NULL)
  +	    delete(m_pachPortName);
   }
   
   ServiceNameType::ServiceNameType(const AxisChar* pachLocalName, const AxisChar* pachUri, const AxisChar* pachPortName)
   :AttributedQName(pachLocalName,pachUri)
   {
  -	free(m_pachPortName);
  -	m_pachPortName = (AxisChar*) malloc(strlen(pachPortName)+1);
  +    if(m_pachPortName != NULL)
  +	    delete(m_pachPortName);
  +	m_pachPortName = new AxisChar(strlen(pachPortName)+1);
   	strcpy(m_pachPortName,pachPortName);
  +}
   
  +ServiceNameType::ServiceNameType(const AxisChar* pachQname, const AxisChar * pachPortName)
  +:AttributedQName(pachQname)
  +{   
  +    if(m_pachPortName != NULL)
  +        delete(m_pachPortName);
  +	m_pachPortName = new AxisChar(strlen(pachPortName)+1);
  +	strcpy(m_pachPortName,pachPortName);
   }
   
   AxisChar * ServiceNameType::getPortName()
  @@ -57,8 +67,8 @@
   
   void ServiceNameType::setPortName(AxisChar * pachPortName)
   {
  -	free(m_pachPortName);
  -	m_pachPortName = (AxisChar*) malloc(strlen(pachPortName)+1);
  +	delete(m_pachPortName);
  +	m_pachPortName = new AxisChar(strlen(pachPortName)+1);
   	strcpy(m_pachPortName,pachPortName);
   }
   
  @@ -71,14 +81,10 @@
   
   	pIHeaderBlock->setLocalName(Constants.PORT_TYPE);
   	pIHeaderBlock->setUri(Constants.NS_URI_ADDRESSING);
  -   		        
  -	printf("in the WsaHandler::Invoke : %s\n");	
  -    
  -	if(strlen(m_pachPortName)!=0){
  -    
  +   		          
  +	if(m_pachPortName!=NULL && strlen(m_pachPortName)!=0)   
   		pIHeaderBlock->createAttribute(Constants.PORT_NAME,"",m_pachPortName);
  -	}
  -
  +	
   	BasicNode * pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE);
   	pBasicNode->setValue(getQname());
   	pIHeaderBlock->addChild(pBasicNode);
  
  
  
  1.3       +8 -7      ws-axis/contrib/wsa4c/addressing/ServiceNameType.hpp
  
  Index: ServiceNameType.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/ServiceNameType.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServiceNameType.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ ServiceNameType.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -33,9 +33,9 @@
   #define __SERVICE_NAME_OF_AXIS_INCLUDED__
   
   #include "AttributedQName.hpp"
  -#include <axis/server/BasicNode.hpp>
  -#include <axis/server/IHeaderBlock.hpp>
  -#include <axis/server/IMessageData.hpp>
  +#include <axis/BasicNode.hpp>
  +#include <axis/IHeaderBlock.hpp>
  +#include <axis/IMessageData.hpp>
   
   AXIS_CPP_NAMESPACE_USE
     
  @@ -54,15 +54,16 @@
     * </pre>
     * 
     */
  -class ServiceNameType:public AttributedQName{
  -      
  +class ServiceNameType:public AttributedQName
  +{      
   public:
       ServiceNameType();
   	~ServiceNameType();
   	AxisChar * getPortName();
   	void setPortName(AxisChar * pachPortName);
  -	ServiceNameType(const AxisChar* pachLocalName, const AxisChar* pachUri,const AxisChar * portName);
  -	IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);
  +	ServiceNameType(const AxisChar* pachLocalName, const AxisChar* pachUri,const AxisChar * pachPortName);
  +	ServiceNameType(const AxisChar* pachQname, const AxisChar * pachPortName);
  +    IHeaderBlock * toSoapHeaderBlock(IMessageData *pIMsg);
   private:
   	AxisChar * m_pachPortName;
           
  
  
  
  1.3       +2 -3      ws-axis/contrib/wsa4c/addressing/To.cpp
  
  Index: To.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/To.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- To.cpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ To.cpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -28,12 +28,11 @@
   
    */
   
  -
   #include "To.hpp" 	
   
  -To::To(AxisChar * pachUri)
  +To::To(const AxisChar * pachUri)
   :AttributedUri(Constants.TO,pachUri)
  -{
  +{    
   }
   		 
   
  
  
  
  1.3       +4 -9      ws-axis/contrib/wsa4c/addressing/To.hpp
  
  Index: To.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/addressing/To.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- To.hpp	19 Nov 2004 10:40:33 -0000	1.2
  +++ To.hpp	24 Mar 2005 10:12:00 -0000	1.3
  @@ -35,15 +35,10 @@
   #include "AttributedURI.hpp"
   #include <string>
   
  -class To:public AttributedUri {
  -public:
  -    /***
  -     * Constructor To
  -     * @param uri 
  -     */
  -	To(AxisChar * pachUri);
  -
  -          
  +class To:public AttributedUri 
  +{
  +public:  
  +	To(const AxisChar * pachUri);         
   };
   
   #endif
  
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/AddressingHeaders.cpp
  
  Index: AddressingHeaders.cpp
  ===================================================================
  /*
  
   * Copyright 2001-2004 The Apache Software Foundation.
  
   * 
  
   * Licensed under the Apache License, Version 2.0 (the "License");
  
   * you may not use this file except in compliance with the License.
  
   * You may obtain a copy of the License at
  
   * 
  
   *      http://www.apache.org/licenses/LICENSE-2.0
  
   * 
  
   * Unless required by applicable law or agreed to in writing, software
  
   * distributed under the License is distributed on an "AS IS" BASIS,
  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
   * See the License for the specific language governing permissions and
  
   * limitations under the License.
  
   */
  
  #include <stdlib.h>
  #include <stdio.h>
  #include "AddressingHeaders.hpp"
  #include "AttributedQName.hpp"
  #include "ServiceNameType.hpp"
  #include "PortType.hpp"
  
  /***
   * Class AddressingHeaders
   * 
   */
  AddressingHeaders::AddressingHeaders()
  {
      init();    
  }
  
  AddressingHeaders::AddressingHeaders(IMessageData *pIMsg)              
  {
  	new AddressingHeaders(pIMsg,false,false,false);
  }
   
  AddressingHeaders::AddressingHeaders(IMessageData *pIMsg, bool process, bool remove)      
  {
      new AddressingHeaders( pIMsg, process, remove, false);   
  }
  
  AddressingHeaders::AddressingHeaders(IMessageData *pIMsg, bool process , bool remove, bool setMustUnderstand)              
  {
      this->init();
      
  	IHandlerSoapDeSerializer* pIDSZ;
  	pIMsg->getSoapDeSerializer(&pIDSZ);
  
  	IHeaderBlock * pHeaderBlock = pIDSZ->getHeaderBlock(Constants.MESSAGE_ID,Constants.NS_URI_ADDRESSING);	
      
      if(pHeaderBlock != NULL)
  	{
  		m_pMessageId = new MessageId((AxisChar*)pHeaderBlock->getFirstChild()->getValue());
  		const AxisChar * pachValue = pHeaderBlock->getAttributeValue(Constants.MUSTUNDERSTAND,Constants.NS_PREFIX_SOAP_ENVELOPE);
          if(pachValue != NULL && strcmp(pachValue,"1")==0)
              m_pMessageId->setMustUnderstand(true);
  	}
      
      pHeaderBlock = pIDSZ->getHeaderBlock(Constants.TO,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL)
  	{
  		m_pTo = new To(pHeaderBlock->getFirstChild()->getValue());
  		const AxisChar * pachValue = pHeaderBlock->getAttributeValue(Constants.MUSTUNDERSTAND,Constants.NS_PREFIX_SOAP_ENVELOPE);
          if(pachValue != NULL && strcmp(pachValue,"1")==0)
              m_pMessageId->setMustUnderstand(true);
  	}
      
      pHeaderBlock = pIDSZ->getHeaderBlock(Constants.ACTION,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL)
  	{
  		m_pAction = new Action((AxisChar*)pHeaderBlock->getFirstChild()->getValue());
  		const AxisChar * pachValue = pHeaderBlock->getAttributeValue(Constants.MUSTUNDERSTAND,Constants.NS_PREFIX_SOAP_ENVELOPE);
          if(pachValue != NULL && strcmp(pachValue,"1")==0)
              m_pMessageId->setMustUnderstand(true);
  	}
      
      pHeaderBlock = pIDSZ->getHeaderBlock(Constants.FROM,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL && pHeaderBlock->getFirstChild()!=NULL)
      {
          m_pFrom = new From(pHeaderBlock);
         	const AxisChar * pachValue = pHeaderBlock->getAttributeValue(Constants.MUSTUNDERSTAND,Constants.NS_PREFIX_SOAP_ENVELOPE);
          if(pachValue != NULL && strcmp(pachValue,"1")==0)
              m_pMessageId->setMustUnderstand(true);   
  	}
  
      pHeaderBlock = pIDSZ->getHeaderBlock(Constants.REPLY_TO,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL)
  	{
          m_pReplyTo = new ReplyTo(pHeaderBlock);
  		const AxisChar * pachValue = pHeaderBlock->getAttributeValue(Constants.MUSTUNDERSTAND,Constants.NS_PREFIX_SOAP_ENVELOPE);
          if(pachValue != NULL && strcmp(pachValue,"1")==0)
              m_pMessageId->setMustUnderstand(true);
  	}
   
      pHeaderBlock = pIDSZ->getHeaderBlock(Constants.FAULT_TO,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL)
  	{
          m_pFaultTo = new FaultTo(pHeaderBlock);
  		const AxisChar * pachValue = pHeaderBlock->getAttributeValue(Constants.MUSTUNDERSTAND,Constants.NS_PREFIX_SOAP_ENVELOPE);
          if(pachValue != NULL && strcmp(pachValue,"1")==0)
              m_pMessageId->setMustUnderstand(true);
  	}
   
      pHeaderBlock = pIDSZ->getHeaderBlock(Constants.RELATES_TO,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL)
  	{
  		addRelatesTo((AxisChar*)pHeaderBlock->getFirstChild()->getValue(),NULL);
  	}
     
  	pHeaderBlock = pIDSZ->getHeaderBlock(Constants.REFERENCE_PROPERTIES,Constants.NS_URI_ADDRESSING);	
  	if(pHeaderBlock != NULL)
  	{
  		m_pReferenceProperties = new ReferenceProperties(pHeaderBlock);
  	}
  	
  }
  
  AddressingHeaders::~AddressingHeaders()
  {
      if(m_pAction != NULL)
          delete(m_pAction);
      if(m_pReplyTo != NULL)
          delete(m_pReplyTo);
      if(m_pTo != NULL)
          delete(m_pTo);
      if(m_pFaultTo != NULL)
          delete(m_pFrom);
      if(m_pFrom != NULL)
          delete(m_pFrom);
      if(m_pMessageId != NULL)
          delete(m_pMessageId);
      if(m_pReferenceProperties != NULL)
          delete(m_pReferenceProperties);
  }
  
  void AddressingHeaders::init()
  {
      m_pAction = NULL;
      m_pReplyTo = NULL;
      m_pTo = NULL;
      m_pFaultTo = NULL;
      m_pFrom = NULL;
      m_pMessageId = NULL;
      m_pReferenceProperties = NULL;
  }
       
  Action * AddressingHeaders::getAction() 
  {
      return m_pAction;
  }
   
  void AddressingHeaders::setAction(Action * pAction) 
  {
      m_pAction = pAction;
  }
   
  To * AddressingHeaders::getTo() 
  {
      return m_pTo;
  }
  
  void AddressingHeaders::setTo(AxisChar * pachUri)
  {
      if(m_pTo != NULL)
          delete(m_pTo);
      m_pTo = new To(pachUri);
  }
   
  void AddressingHeaders::setTo(To * pTo) 
  {
      m_pTo = pTo;
  }
   
  void AddressingHeaders::setMessageId(MessageId * pMessageId) 
  {
      m_pMessageId = pMessageId;
  }
       
  void AddressingHeaders::setReferenceProperties(ReferenceProperties * pRefProps) 
  {
      m_pReferenceProperties = pRefProps;
  }
       
  ReferenceProperties * AddressingHeaders::getReferenceProperties() 
  {
      return m_pReferenceProperties;
  }
   
  void AddressingHeaders::toSoapMessage(IMessageData *pIMsg)
  {   
      if (m_pMessageId != NULL)
  	   m_pMessageId->toSoapHeaderBlock(pIMsg);	
  
      if (m_pAction != NULL)
          m_pAction->toSoapHeaderBlock(pIMsg);       
  
  	if(m_pTo != NULL)
          m_pTo->toSoapHeaderBlock(pIMsg);
     
      if (m_pFrom != NULL)   
          m_pFrom->toSoapHeaderBlock(pIMsg);
     
  	if (m_pReplyTo != NULL)
          m_pReplyTo->toSoapHeaderBlock(pIMsg);	
       
  	if (m_pFaultTo != NULL)
          m_pFaultTo->toSoapHeaderBlock(pIMsg);		
       	
      list<RelatesTo*>::iterator relatesTo = m_relatesToList.begin();
      while(relatesTo != m_relatesToList.end())
  	{
          (*relatesTo)->toSoapHeaderBlock(pIMsg);
  		relatesTo++;
  	}
  }
   
  MessageId * AddressingHeaders::getMessageId() 
  {
      return m_pMessageId;
  }
   
  list<RelatesTo*> AddressingHeaders::getRelatesToList()
  {
      return m_relatesToList;
  }
   
  void AddressingHeaders::setRelatesToList(list<RelatesTo*> relatesToList)
  {
      m_relatesToList = relatesToList;
  }
  
  void AddressingHeaders::addRelatesTo(AxisChar * pachUri, RelationshipType * pType)
  {
      RelatesTo * pRelatesTo = new RelatesTo(pachUri);
      if(pType != NULL)
          pRelatesTo->setRelationshipType(pType);
      m_relatesToList.push_back(pRelatesTo);   
  }
  
  From * AddressingHeaders::getFrom() 
  {
      return m_pFrom;
  }
   
  void AddressingHeaders::setFrom(From * pFrom) 
  {   
      m_pFrom = pFrom;
  }
  
  ReplyTo * AddressingHeaders::getReplyTo() 
  {
      return m_pReplyTo;
  }
   
  void AddressingHeaders::setReplyTo(ReplyTo * pReplyTo) 
  {
      m_pReplyTo = pReplyTo;
  }
  
  
  EndpointReferenceType * AddressingHeaders::getFaultTo() 
  {
      return m_pFaultTo;
  }
  
  void AddressingHeaders::setFaultTo(FaultTo * pFaultTo) 
  {
      this->m_pFaultTo = new FaultTo(pFaultTo->getAddress()->getUri());
  }
   
  bool AddressingHeaders::isSetMustUnderstand() 
  {
      return m_bSetMustUnderstand;
  }
  
  void AddressingHeaders::setSetMustUnderstand(bool setMustUnderstand) 
  {
      m_bSetMustUnderstand = setMustUnderstand;
  }
  
  
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/AddressingHeaders.hpp
  
  Index: AddressingHeaders.hpp
  ===================================================================
  #if !defined(__ADDRESSING_HEADERS_OF_AXIS_INCLUDED__)
  #define __ADDRESSING_HEADERS_OF_AXIS_INCLUDED__
  
  #include <map>
  #include "Action.hpp"
  #include "ReplyTo.hpp"
  #include "FaultTo.hpp"
  #include "From.hpp"
  #include "To.hpp"
  #include "MessageID.hpp"
  #include "ReferenceProperties.hpp"
  #include "RelatesTo.hpp"
  #include "RelationshipType.hpp"
  
  using namespace std;
  
  class AddressingHeaders 
  {
  private:
  	Action * m_pAction;
      ReplyTo * m_pReplyTo;
      To * m_pTo;
      FaultTo * m_pFaultTo;
      From * m_pFrom;
      MessageId * m_pMessageId;
      list<RelatesTo*> m_relatesToList;  
      ReferenceProperties * m_pReferenceProperties;
      bool m_bSetMustUnderstand;
    
  public:
     
      AddressingHeaders();
      AddressingHeaders(IMessageData *pIMsg);
      AddressingHeaders(IMessageData *pIMsg,bool bProcess,bool bRemove);
      AddressingHeaders(IMessageData *pIMsg,bool bProcess, bool bRemove, bool setMustUnderstand);
      ~AddressingHeaders();
      void init();    
      Action * getAction();
      void setAction(Action * pAction);
      To * getTo();
      void setTo(AxisChar * pachUri); 
      void setTo(To * pTo);
      void setMessageId(MessageId * pMessageId);
      void setReferenceProperties(ReferenceProperties * pRefProps);
      ReferenceProperties * getReferenceProperties();
      void toSoapMessage(IMessageData *pIMsg);
      MessageId * getMessageId();
      list<RelatesTo*> getRelatesToList();
      void setRelatesToList(list<RelatesTo*> relatesToList);
      void addRelatesTo(AxisChar * pachUri, RelationshipType * pType);
      From * getFrom();
      void setFrom(From * pFrom);
      ReplyTo * getReplyTo();
      void setReplyTo(ReplyTo * pReplyTo);
      EndpointReferenceType * getFaultTo();
      void setFaultTo(FaultTo * pFaultTo);                                                  
      bool isSetMustUnderstand();
      void setSetMustUnderstand(bool setMustUnderstand);
  };
  #endif
  
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/ClientHandler.cpp
  
  Index: ClientHandler.cpp
  ===================================================================
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   *
   *
   * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcs.slt.lk)
   *
   */
  
  //
  //////////////////////////////////////////////////////////////////////
  
  #include "WsaClientHandler.hpp"
  #include <axis/GDefine.hpp>
  
  extern "C" {
  //the two export functions////////////////////////////////////////////
  
  //Following describes how the export function of the handler DLLs (or .so s)
  
  STORAGE_CLASS_INFO
  int GetClassInstance(BasicHandler **inst)
  {
  	*inst = new BasicHandler();
  	
  	WsaClientHandler* pCHandler = new WsaClientHandler();
  	(*inst)->_functions = 0;
  	if (pCHandler)
  	{
  		(*inst)->_object = pCHandler;
  		return pCHandler->init();
  	}
  	
  	return AXIS_FAIL;
  }
  
  STORAGE_CLASS_INFO
  int DestroyInstance(BasicHandler *inst)
  {
  	if (inst)
  	{
  		Handler* pH = static_cast<Handler*>(inst->_object);
  		pH->fini();
  		delete pH;
  		delete inst;
  		return AXIS_SUCCESS;
  	}
  	return AXIS_FAIL;
  }
  
  }
  
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/ServerHandler.cpp
  
  Index: ServerHandler.cpp
  ===================================================================
  /*
  
   * Copyright 2001-2004 The Apache Software Foundation.
  
   * 
  
   * Licensed under the Apache License, Version 2.0 (the "License");
  
   * you may not use this file except in compliance with the License.
  
   * You may obtain a copy of the License at
  
   * 
  
   *      http://www.apache.org/licenses/LICENSE-2.0
  
   * 
  
   * Unless required by applicable law or agreed to in writing, software
  
   * distributed under the License is distributed on an "AS IS" BASIS,
  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
   * See the License for the specific language governing permissions and
  
   * limitations under the License.
  
   */
  
  #include "WsaServerHandler.hpp"
  
  extern "C" {
  
  STORAGE_CLASS_INFO
  int GetClassInstance(BasicHandler **inst)
  {
  	*inst = new BasicHandler();
  	
  	WsaServerHandler* pWsaHandler = new WsaServerHandler();
  	(*inst)->_functions = 0;
  	if (pWsaHandler)
  	{
  		(*inst)->_object = pWsaHandler;
  		return pWsaHandler->init();
  	}
  	
  	return AXIS_FAIL;
  }
  
  STORAGE_CLASS_INFO
  int DestroyInstance(BasicHandler *inst)
  {
  	if (inst)
  	{
  		Handler* pH = static_cast<Handler*>(inst->_object);
  		pH->fini();
  		delete pH;
  		delete inst;
  		return AXIS_SUCCESS;
  	}
  	return AXIS_FAIL;
  }
  
  }
  
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/WsaClientHandler.cpp
  
  Index: WsaClientHandler.cpp
  ===================================================================
  /*
  
   * Copyright 2001-2004 The Apache Software Foundation.
  
   * 
  
   * Licensed under the Apache License, Version 2.0 (the "License");
  
   * you may not use this file except in compliance with the License.
  
   * You may obtain a copy of the License at
  
   * 
  
   *      http://www.apache.org/licenses/LICENSE-2.0
  
   * 
  
   * Unless required by applicable law or agreed to in writing, software
  
   * distributed under the License is distributed on an "AS IS" BASIS,
  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
   * See the License for the specific language governing permissions and
  
   * limitations under the License.
  
   */
  
  #include "WsaClientHandler.hpp"
  #include "AddressingHeaders.hpp"
  
  int AXISCALL WsaClientHandler::fini()
  {
      	return AXIS_SUCCESS;
  }
  
  int AXISCALL WsaClientHandler::init()
  {       
      	return AXIS_SUCCESS;
  }
  
  void AXISCALL WsaClientHandler::onFault(void* pvIMsg)
  {
  }
  
  int AXISCALL WsaClientHandler::invoke(void* pvIMsg)
  {
  	printf("test0\n");
      IMessageData *pIMsg = (IMessageData*) pvIMsg;
      IHandlerSoapSerializer* pISZ; 
      pIMsg->getSoapSerializer(&pISZ);  
      pISZ->addNamespaceToEnvelope(Constants.NS_URI_ADDRESSING,"wsa"); 
  	printf("test1\n");
    
  	if(pIMsg->isPastPivot())    		
  		processClientResponse(pIMsg);/*this is a client response*/  
      else       
          processClientRequest(pIMsg);/*this is server request*/
  
  	return AXIS_SUCCESS;
  }
  
  WsaClientHandler::WsaClientHandler()
  {
  }
  
  WsaClientHandler::~WsaClientHandler()
  {
  }
      
  void WsaClientHandler::processClientRequest(IMessageData * pIMsg)
  {
      
  	AddressingHeaders * pReqHeaders = (AddressingHeaders*) pIMsg->getComplexProperty(
                     Constants.ENV_ADDRESSING_REQUEST_HEADERS);
      if (pReqHeaders == NULL) 
      {
          pReqHeaders = new AddressingHeaders();
      } 
  
      if (pReqHeaders->getMessageId() == NULL) 
  	{
  		AxisChar * pachTempUUID = (AxisChar*)malloc(42);
          strcpy(pachTempUUID,"uuid:");
          strcat(pachTempUUID,pUUIDGen->nextUUID());
          MessageId * pMessageId = new MessageId(pachTempUUID);
          pMessageId->setMustUnderstand(true);
          pReqHeaders->setMessageId(pMessageId);
      }
        
      if (pReqHeaders->getTo() == NULL ) 			
  	{
  		AxisChar * pachToUri = (AxisChar*)pIMsg->getProperty(Constants.ENV_ADDRESSING_TO_URI);
  		if(strlen(pachToUri)!=0)
  			pReqHeaders->setTo(pachToUri);
           
  	}
       
  	AxisChar * pachActionUri = (AxisChar*) pIMsg->getProperty(Constants.ENV_ADDRESSING_ACTION_URI);
      if (strlen(pachActionUri) != 0) 
  	{
  		pReqHeaders->setAction(new Action(pachActionUri));
      }
  	else if(pReqHeaders->getAction() != NULL) 
  	{
                       
  	}
  		 
      if (pReqHeaders->getFrom() == NULL) 
      {
           AxisChar * pFromUri = (AxisChar*) pIMsg->getProperty(Constants.ENV_ADDRESSING_FROM_URI);
           if (strlen(pFromUri)!=0)
  		 {            
               pReqHeaders->setFrom(new From(pFromUri));
           } 
  		 else 
  		 {   
            	 pReqHeaders->setFrom(new From(Constants.NS_URI_ANONYMOUS));		     
           }
      }
  
      AxisChar * pachReplyToUri = (AxisChar*) pIMsg->getProperty(Constants.ENV_ADDRESSING_REPLYTO_URI);
    
      if (pReqHeaders->getReplyTo() == NULL) 
      {
  		if (strlen(pachReplyToUri) != 0)
  		{
              pReqHeaders->setReplyTo(new ReplyTo(pachReplyToUri));                    
          } 
  		else 
  		{
              pReqHeaders->setReplyTo(new ReplyTo(pReqHeaders->getFrom()->getAddress()->getUri()));
  			
          }
      }
    	         
      AxisChar* pachFaultToUri = (AxisChar*) pIMsg->getProperty(Constants.ENV_ADDRESSING_FAULTTO_URI);   
      if (pReqHeaders == NULL && strlen(pachFaultToUri)!=0) 
      {
           pReqHeaders->setFaultTo(new FaultTo(pachFaultToUri));
      }	
  
      ReferenceProperties * pRefprops = (ReferenceProperties*)pIMsg->getComplexProperty(Constants.ENV_ADDRESSING_REFERENCEPROPERTIES);
      //For testing
      pRefprops = new ReferenceProperties(Constants.REFERENCE_PROPERTIES);
      //pRefprops->setLocalName(Constants.REFERENCE_PROPERTIES);
      pRefprops->addProperty("Name1","Value1");
      pRefprops->addProperty("Name2","Value2");
      pRefprops->addProperty("Name3","Value3");
   
      if(pRefprops != NULL)
      {
          From * pFrom = pReqHeaders->getFrom();
          if(pFrom != NULL)
              pFrom->setProperties(pRefprops);
      }
  
      pIMsg->setComplexProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS, (void*)pReqHeaders,sizeof(AddressingHeaders));     
      pReqHeaders->toSoapMessage(pIMsg); 
      	  
  }
  
  void WsaClientHandler::processClientResponse(IMessageData * pIMsg)
  {
   AddressingHeaders * pReqHeaders = 
               new AddressingHeaders(pIMsg,false,false,false);
   pIMsg->setComplexProperty(Constants.ENV_ADDRESSING_RESPONSE_HEADERS,
                                  (void*)pReqHeaders,sizeof(AddressingHeaders));
           
  }
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/WsaClientHandler.hpp
  
  Index: WsaClientHandler.hpp
  ===================================================================
  /*
  
   * Copyright 2001-2004 The Apache Software Foundation.
  
   * 
  
   * Licensed under the Apache License, Version 2.0 (the "License");
  
   * you may not use this file except in compliance with the License.
  
   * You may obtain a copy of the License at
  
   * 
  
   *      http://www.apache.org/licenses/LICENSE-2.0
  
   * 
  
   * Unless required by applicable law or agreed to in writing, software
  
   * distributed under the License is distributed on an "AS IS" BASIS,
  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
   * See the License for the specific language governing permissions and
  
   * limitations under the License.
  
   */
  
  
  #if !defined(_WSA_CLIENT_HANDLER_H____OF_AXIS_INCLUDED_)
  #define _WSA_CLIENT_HANDLER_H____OF_AXIS_INCLUDED_
  
  #include <axis/Handler.hpp>
  #include <axis/IMessageData.hpp>
  #include ".\..\utils\UUIDGen.hpp"
  
  AXIS_CPP_NAMESPACE_USE
  
  class WsaClientHandler : public Handler
  {
  protected:
  	UUIDGen * pUUIDGen;
  
  public:
  	int AXISCALL fini();
  	int AXISCALL init();
  	void AXISCALL onFault(void* pvIMsg);
  	int AXISCALL invoke(void* pvIMsg);
  	WsaClientHandler();
  	virtual ~WsaClientHandler();   
      void processClientResponse(IMessageData * pIMsg);
      void processClientRequest(IMessageData * pIMsg);
      
  };
  
  #endif 
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/WsaServerHandler.cpp
  
  Index: WsaServerHandler.cpp
  ===================================================================
  /*
  
   * Copyright 2001-2004 The Apache Software Foundation.
  
   * 
  
   * Licensed under the Apache License, Version 2.0 (the "License");
  
   * you may not use this file except in compliance with the License.
  
   * You may obtain a copy of the License at
  
   * 
  
   *      http://www.apache.org/licenses/LICENSE-2.0
  
   * 
  
   * Unless required by applicable law or agreed to in writing, software
  
   * distributed under the License is distributed on an "AS IS" BASIS,
  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
   * See the License for the specific language governing permissions and
  
   * limitations under the License.
  
   */
  
  #include <stdlib.h>
  #include <stdio.h>
  #include "WsaServerHandler.hpp"
  #include <axis/GDefine.hpp>
  #include <axis/IHandlerSoapSerializer.hpp>
  #include <axis/IHandlerSoapDeSerializer.hpp>
  #include <axis/IHeaderBlock.hpp>
  #include <axis/BasicNode.hpp>
  #include <iostream>
  #include "AddressingHeaders.hpp"
  #include "EndpointReferenceType.hpp"
  #include "MessageID.hpp"
  
  
  WsaServerHandler::WsaServerHandler()
  {
  }
  
  WsaServerHandler::~WsaServerHandler()
  {
  }
  
  int WsaServerHandler::invoke(void *pvIMsg)
  {
  	IMessageData *pIMsg = (IMessageData*) pvIMsg;
      IHandlerSoapSerializer* pISZ; 
      pIMsg->getSoapSerializer(&pISZ);  
      pISZ->addNamespaceToEnvelope(Constants.NS_URI_ADDRESSING,Constants.NS_PREFIX_ADDRESSING); 
    
          
  	if(pIMsg->isPastPivot()) 
      {
  		/*this is a server response*/
  		processServerResponse(pIMsg);
      }
      else
      {
          /*this is server request*/
          processServerRequest(pIMsg);
      }
  
  	
  	return AXIS_SUCCESS;
  }
  
  void WsaServerHandler::onFault(void *pvIMsg)
  {
      IMessageData *pIMsg = (IMessageData*) pvIMsg;
      processFault(pIMsg);
  }
  
  int WsaServerHandler::init()
  {
  	//do any initialization, resetting of values
      return AXIS_SUCCESS;
  }
  
  int WsaServerHandler::fini()
  {
  	//do any finalizatoin
     	return AXIS_SUCCESS;
  }
  
  void WsaServerHandler::processServerResponse(IMessageData * pIMsg)
  {
     
      /*Get the Request Headers from the pIMsg data
        This requires the addition of requestHeader attribute from IMessageData*/
  	
  	AddressingHeaders * pReqHeaders = (AddressingHeaders*)pIMsg->getComplexProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS);
     
      if (pReqHeaders == NULL) 
          return;
  	
      AddressingHeaders * pResHeaders = (AddressingHeaders*) pIMsg->getComplexProperty(Constants.ENV_ADDRESSING_RESPONSE_HEADERS);
  	if(pResHeaders==NULL)
  		pResHeaders = new AddressingHeaders();
  	 
      // set From
      From * pFromEpr = pResHeaders->getFrom();
      if (pFromEpr == NULL) 
  	{
          To * pTo = pReqHeaders->getTo();
          if (pTo != NULL && pTo->getUri()!=NULL)
  		{
  			pFromEpr = new From(pTo->getUri());
              pResHeaders->setFrom(pFromEpr);         
  		}
      }
    
      // set Action
      Action * pAction = pResHeaders->getAction();
      if (pAction == NULL) 
  	{
      // not set - try request headers
          pAction = pReqHeaders->getAction();
          if (pAction != NULL && pAction->getUri()!=NULL) 
  		{
              AxisChar * pTempChar = (AxisChar*) malloc(strlen("Response")+strlen(pAction->getUri())+1);
              strcpy(pTempChar,pAction->getUri());
              strcat(pTempChar,"Response");
              pResHeaders->setAction(new Action(pTempChar)) ;
              free(pTempChar);
          }
      }
    
      if (pResHeaders->getTo() == NULL && pReqHeaders->getFrom() != NULL) 
      {
         From * pFrom = pReqHeaders->getFrom();
         pResHeaders->setTo(pFrom->getAddress()->getUri());
      } 
      else 
      {
          pResHeaders->setTo(new To(Constants.NS_URI_ANONYMOUS));
      }
      
      //Set Reference Properties
      if (pReqHeaders->getReferenceProperties() != NULL)
      {  
          ReferenceProperties * pReqprops = pReqHeaders->getReferenceProperties();
  
          ReferenceProperties * pResprops = new ReferenceProperties(pReqprops);
  
          pResHeaders->setReferenceProperties(pResprops);         
      }
      
      // process RelatesTo
      MessageId * pMsgId = pReqHeaders->getMessageId();
      if (pMsgId != NULL) 
  	{
       
          pResHeaders->addRelatesTo(pMsgId->getUri(),NULL);      
        
      }
  
      //We require a message id generator here;
      AxisChar * pachTempUUID = (AxisChar*)malloc(42);
      strcpy(pachTempUUID,"uuid:");
      strcat(pachTempUUID,pUUIDGen->nextUUID());
  	
      IHandlerSoapSerializer* pISZ;
  	pIMsg->getSoapSerializer(&pISZ);
      IHeaderBlock * pIHeaderBlock = NULL;
  	if(pISZ != NULL)
  		pIHeaderBlock = pISZ->getHeaderBlock(Constants.MESSAGE_ID,Constants.NS_URI_ADDRESSING);
  
  	if(pIHeaderBlock == NULL)
  	{
  		MessageId * pMessageId = new MessageId(pachTempUUID);
  		pMessageId->setMustUnderstand(true);
          pResHeaders->setMessageId(pMessageId);
  	}
  	else
  	{
  		//either remove older header and put the new header/update the older header
  		MessageId * pMessageId = new MessageId(pachTempUUID);
          pMessageId->setMustUnderstand(true);
  		pResHeaders->setMessageId(pMessageId);
  	}
  
      //free(pachTempUUID);
      pResHeaders->toSoapMessage(pIMsg);        
           
      // process ReplyTo
      ReplyTo * pReplyTo = pReqHeaders->getReplyTo();
      if (pReplyTo != NULL) 
  	{
          AttributedUri * pAddress = (AttributedUri*)pReplyTo->getAddress();
          if (pAddress != NULL) 
  		{
              AxisChar * pachUri = pAddress->getUri();
              if (pachUri != NULL && strcmp(pachUri,Constants.NS_URI_ANONYMOUS)!=0)
  			{
                  //forward message
              }
          }
      }
  }
  
  void WsaServerHandler::processServerRequest(IMessageData * pIMsg)
  {
           
     if (pIMsg == NULL) {
         return;
     }
     AddressingHeaders * pReqHeaders = 
               new AddressingHeaders(pIMsg,false,false,false);
     
     pIMsg->setComplexProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS,
                                  (void*)pReqHeaders,sizeof(AddressingHeaders));
           
  }
  
  void WsaServerHandler::processFault(IMessageData * pIMsg)
  {
      AddressingHeaders * pReqHeaders =
                (AddressingHeaders*) pIMsg->getComplexProperty(
                    Constants.ENV_ADDRESSING_REQUEST_HEADERS);
   
      if (pReqHeaders == NULL) 
      {
               // error?
               return;
      }
   
      AddressingHeaders * pResHeaders = (AddressingHeaders*) pIMsg->getComplexProperty(Constants.ENV_ADDRESSING_RESPONSE_HEADERS);
  	if(pResHeaders==NULL)
  		pResHeaders = new AddressingHeaders();
  
      //set From
      From * pFromEpr = pResHeaders->getFrom();
      if (pFromEpr == NULL) 
  	{
          To * pTo = pReqHeaders->getTo();
          if (pTo != NULL && pTo->getUri()!=NULL)
  		{
  			pFromEpr = new From(pTo->getUri());
              pResHeaders->setFrom(pFromEpr);         
  		}
      }
      
      if (strcmp(Constants.NS_URI_ADDRESSING,Constants.NS_URI_ADDRESSING_04)==0) 
      {
          pResHeaders->setAction(new Action(Constants.FAULT_ACTION));
      }
  
      MessageId * pMsgId = pReqHeaders->getMessageId();
      if (pMsgId != NULL) 
  	{
          pResHeaders->addRelatesTo(pMsgId->getUri(),NULL);      
      }
   
      AxisChar * pachTempUUID = (AxisChar*)malloc(42);
      strcpy(pachTempUUID,"uuid:");
      strcat(pachTempUUID,pUUIDGen->nextUUID());
  	
      IHandlerSoapSerializer* pISZ;
  	pIMsg->getSoapSerializer(&pISZ);
      IHeaderBlock * pIHeaderBlock = NULL;
  	if(pISZ != NULL)
  		pIHeaderBlock = pISZ->getHeaderBlock(Constants.MESSAGE_ID,Constants.NS_URI_ADDRESSING);
  	
  	if(pIHeaderBlock == NULL)
  	{
  		MessageId * pMessageId = new MessageId(pachTempUUID);
  		pResHeaders->setMessageId(pMessageId);
  	}
  	else
  	{
  		//either remove older header and put the new header/update the older header
  		MessageId * pMessageId = new MessageId(pachTempUUID);
          pResHeaders->setMessageId(pMessageId);
  	}
  
     
      //free(pachTempUUID);
      pResHeaders->toSoapMessage(pIMsg);
   
      // process FaultTo
      EndpointReferenceType * pFaultTo = pReqHeaders->getFaultTo();
      if (pFaultTo != NULL) 
  	{
          AttributedUri * pAddress = (AttributedUri*)pFaultTo->getAddress();
          if (pAddress != NULL) 
  		{
              AxisChar * pachUri = pAddress->getUri();
              if (pachUri != NULL && strcmp(pachUri,Constants.NS_URI_ANONYMOUS)!=0)
  			{
                 
              }
          }
      }
  }
  
  void WsaServerHandler::setTargetService(IMessageData * pIMsg,
                                      AddressingHeaders * pHeaders)
  {
      To * pTo = pHeaders->getTo();
      if (pTo == NULL) 
      {
          return;
      }
      AxisChar * pachToUri = pTo->getUri();
      if (pachToUri == NULL) 
      {
          return;
      }
  
      // set the target service
      AxisChar * pachTempService;
      AxisChar * p = pachToUri;
      while(p!=NULL)
      {
          if(*p=='/')
          {
              pachTempService = (p+1);
  
          }
          p++;
      }
  
     // pIMsg->setService(pachTempService);
  }
  
  
  
  void WsaServerHandler::forwardMessage(EndpointReferenceType * pReplyTo,
                                  IMessageData * pIMsg)
  {
      AttributedUri * pAddress = pReplyTo->getAddress();
   
      AddressingHeaders * pResHeaders = NULL;
      if (pIMsg != NULL) 
      {
           pResHeaders = (AddressingHeaders*) pIMsg->getComplexProperty(Constants.ENV_ADDRESSING_RESPONSE_HEADERS);
      }
      if (pResHeaders == NULL)
      {
          pResHeaders = new AddressingHeaders();
      }
           
      pResHeaders->setTo(pAddress->getUri());
      pResHeaders->setReferenceProperties(pReplyTo->getProperties());
   
      //call
  }
      
  
       
  
  
  
  1.1                  ws-axis/contrib/wsa4c/addressing/WsaServerHandler.hpp
  
  Index: WsaServerHandler.hpp
  ===================================================================
  /*
  
   * Copyright 2001-2004 The Apache Software Foundation.
  
   * 
  
   * Licensed under the Apache License, Version 2.0 (the "License");
  
   * you may not use this file except in compliance with the License.
  
   * You may obtain a copy of the License at
  
   * 
  
   *      http://www.apache.org/licenses/LICENSE-2.0
  
   * 
  
   * Unless required by applicable law or agreed to in writing, software
  
   * distributed under the License is distributed on an "AS IS" BASIS,
  
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  
   * See the License for the specific language governing permissions and
  
   * limitations under the License.
  
   */
  
  
  #if !defined(_WSAHANDLER_H____OF_AXIS_INCLUDED_)
  #define _WSAHANDLER_H____OF_AXIS_INCLUDED_
  
  #include <axis/Handler.hpp>
  #include <axis/IMessageData.hpp>
  #include "..\utils\UUIDGen.hpp"
  #include "AddressingHeaders.hpp"
  
  AXIS_CPP_NAMESPACE_USE
  
  class WsaServerHandler : public Handler
  {
  private:
      UUIDGen * pUUIDGen;
      FILE * f;
      void processServerResponse(IMessageData * pIMsg);
      void processServerRequest(IMessageData * pIMsg);
      void processFault(IMessageData * pIMsg);
  
      void forwardMessage(EndpointReferenceType * pReplyTo,
                     IMessageData * pIMsg);
      void setTargetService(IMessageData * pIMsg,
                                       AddressingHeaders * pHeaders);
  	
  public:
  	int AXISCALL fini();
  	int AXISCALL init();
  	void AXISCALL onFault(void* pvIMsg);
  	int AXISCALL invoke(void* pvIMsg);
  	WsaServerHandler();
  	virtual ~WsaServerHandler();   
      
  };
  
  #endif 
  
  
  1.2       +0 -2      ws-axis/contrib/wsa4c/utils/MacAddress.cpp
  
  Index: MacAddress.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/utils/MacAddress.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MacAddress.cpp	19 Nov 2004 10:44:55 -0000	1.1
  +++ MacAddress.cpp	24 Mar 2005 10:12:01 -0000	1.2
  @@ -171,8 +171,6 @@
     } while (!ret);         /* Stop only on an error.  An error will occur
                                when we go exhaust the list of interfaces to
                                be examined */
  -  getch();
  -
     FreeLibrary(m_hInst);
     /* Free the bindings */
     SNMP_FreeVarBind(&varBind[0]);
  
  
  
  1.2       +65 -46    ws-axis/contrib/wsa4c/utils/UUIDGen.cpp
  
  Index: UUIDGen.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/utils/UUIDGen.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UUIDGen.cpp	19 Nov 2004 10:44:55 -0000	1.1
  +++ UUIDGen.cpp	24 Mar 2005 10:12:01 -0000	1.2
  @@ -30,53 +30,23 @@
   
   #include "UUIDGen.hpp"
   #include <iostream.h>
  -#include "MacAddress.hpp"
  +#ifdef WIN32
  +    #include "MacAddress.hpp"
  +#else
  +
  +#endif
   
   UUIDGen::UUIDGen()
  -{
  -    iClockSequence = nextInt(MAX_RAND);
  +{  
  +   int MAX_RAND = 16384;
  +   iClockSequence = nextInt(MAX_RAND);
   }
   
  -int UUIDGen::hexToint(char cHex)
  -{
  -    switch(cHex)
  -    {
  -    case '0':
  -        return 0;
  -    case '1':
  -        return 1;
  -    case '2':
  -        return 2;
  -    case '3':
  -        return 3;
  -    case '4':
  -        return 4;
  -    case '5':
  -        return 5;
  -    case '6':
  -        return 6;
  -    case '7':
  -        return 7;
  -    case '8':
  -        return 8;
  -    case '9':
  -        return 9;
  -    case 'A':
  -        return 10;
  -    case 'B':
  -        return 11;
  -    case 'C':
  -        return 12;
  -    case 'D':
  -        return 13;
  -    case 'E':
  -        return 14;
  -    case 'F':
  -        return 15;
  -    }
  -}  
   char * UUIDGen::nextUUID()
   {
  +   unsigned long COUNT_START = -12219292800000;
  +   char * pcHexaChars[16] = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};   
  +   
      unsigned long ulCount;
   
      // the number of milliseconds since 1 January 1970
  @@ -105,6 +75,8 @@
              strcat(pcHexString,"0");
              //cout<<"0";
          }
  +       if(i==0)
  +           break;
       }
   			 
       // the time_low field
  @@ -143,6 +115,8 @@
   			strcat(pcClockSeqLow,pcHexaChars[((ulCount >> i*4) & 0xF)]);
           else
               strcat(pcClockSeqHiAndReserved,pcHexaChars[((ulCount >> i*4) & 0xF)]);
  +        if(i==0)
  +            break;
       }
      
       int * piClockSeqHi = new int(hexToint(*pcClockSeqLow));
  @@ -157,9 +131,14 @@
       }
           
       char * pcMacAddress = (char*)malloc(13);
  -    MacAddress *pMacAddress = new MacAddress;
  -    pMacAddress->findMacAddress(pcMacAddress);
  +    #ifdef WIN32
  +        MacAddress *pMacAddress = new MacAddress;
  +        pMacAddress->findMacAddress(pcMacAddress);
  +    #else
  +        //need a way to find MacAddress in linux
  +    #endif
       
  + 
       char * pcUUIDString = (char*)malloc(37);
       strcpy(pcUUIDString,pcTimeLow);
       strcat(pcUUIDString,"-");
  @@ -170,8 +149,8 @@
       strcat(pcUUIDString,pcClockSeqHiAndReserved);
       strcat(pcUUIDString,pcClockSeqLow);
       strcat(pcUUIDString,"-");
  -    strcat(pcUUIDString,strdup(pcMacAddress));
  -
  +    strcat(pcUUIDString,strupr(pcMacAddress));
  +    
       free(pcHexString);
       free(pcTimeLow);
       free(pcTimeMid);
  @@ -181,12 +160,52 @@
       free(pcMacAddress);
       delete(pMacAddress);
       delete(piClockSeqHi);
  -    
  +	    
   
       return pcUUIDString;
   
   } 
   
  +int UUIDGen::hexToint(char cHex)
  +{
  +    switch(cHex)
  +    {
  +    case '0':
  +        return 0;
  +    case '1':
  +        return 1;
  +    case '2':
  +        return 2;
  +    case '3':
  +        return 3;
  +    case '4':
  +        return 4;
  +    case '5':
  +        return 5;
  +    case '6':
  +        return 6;
  +    case '7':
  +        return 7;
  +    case '8':
  +        return 8;
  +    case '9':
  +        return 9;
  +    case 'A':
  +        return 10;
  +    case 'B':
  +        return 11;
  +    case 'C':
  +        return 12;
  +    case 'D':
  +        return 13;
  +    case 'E':
  +        return 14;
  +    case 'F':
  +        return 15;
  +    }
  +	return 0;
  +}  
  +
   int UUIDGen::nextInt(int iNumber)
   {
       if ((iNumber & -iNumber) == iNumber)  // i.e., n is a power of 2
  
  
  
  1.2       +8 -9      ws-axis/contrib/wsa4c/utils/UUIDGen.hpp
  
  Index: UUIDGen.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/wsa4c/utils/UUIDGen.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UUIDGen.hpp	19 Nov 2004 10:44:55 -0000	1.1
  +++ UUIDGen.hpp	24 Mar 2005 10:12:01 -0000	1.2
  @@ -28,18 +28,17 @@
   
    */
   //#include<iostream.h>
  +#if !defined(__UUIDGEN_UTILITY_INCLUDED__)
  +#define __UUIDGEN_UTILITY_INCLUDED__
  +
   #include<string.h>
   #include<time.h>
   #include<stdlib.h>
   #include<malloc.h>
   #include <conio.h>
   
  -const unsigned int COUNT_START = -12219292800000;  // 15 October 1582
  -const unsigned int ULONG_MAX = 4294967295;
  -const unsigned int MAX_RAND = 16384;
  -const char * pcHexaChars[16] = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};   
  -
  -class UUIDGen{
  +class UUIDGen
  +{
   public:
       UUIDGen();
       static char * nextUUID();
  @@ -47,6 +46,6 @@
       static int hexToint(char cHex);    
       int nextInt(int iNumber);
       int next(int iBits);
  -    int iClockSequence;      
  -    
  -};
  \ No newline at end of file
  +    int iClockSequence;     	    
  +};
  +#endif
  \ No newline at end of file