axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From susan...@apache.org
Subject cvs commit: ws-axis/c/tests/client/stubTest/stubBase StubBase.dsp InteropBaseClient.cpp InteropTestPortType.cpp InteropTestPortType.h
Date Mon, 21 Jun 2004 13:14:03 GMT
susantha    2004/06/21 06:14:03

  Modified:    c/include/axis/server HeaderBlock.h IHeaderBlock.h
               c/src/engine/client Call.cpp
               c/src/soap HeaderBlock.cpp SoapSerializer.cpp
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp
                        ClientStubHeaderWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        ClientStubHeaderWriter.java
               c/tests/client/stubTest/stubBase InteropBaseClient.cpp
                        InteropTestPortType.cpp InteropTestPortType.h
  Added:       c/tests  alltests.dsw
               c/tests/client/stubTest/stubBase StubBase.dsp
  Log:
  Fixed the bug reported in mail thread
  http://marc.theaimsgroup.com/?l=axis-c-dev&m=108780799904108&w=2
  
  Revision  Changes    Path
  1.16      +7 -5      ws-axis/c/include/axis/server/HeaderBlock.h
  
  Index: HeaderBlock.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/HeaderBlock.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- HeaderBlock.h	14 Jun 2004 08:00:44 -0000	1.15
  +++ HeaderBlock.h	21 Jun 2004 13:14:02 -0000	1.16
  @@ -99,7 +99,7 @@
           list<AxisChar*>& lstTmpNameSpaceStack);
   
       AxisString m_localname;
  -    AxisString m_prefix;
  +    AxisString m_sPrefix;
       AxisString m_uri;
       list<Attribute*> m_attributes;
       list<Attribute*> m_namespaceDecls;
  @@ -309,13 +309,16 @@
         */
       void setUri(const AxisChar* uri);
   
  -    /**
  +    /*
         * Sets the prefix of this Header Block.
         *
         * @param prefix The prefix to set in.
         */
  +	/* Commented by Susantha - 21/06/2004
  +	 * The prefix should be decided by the Serializer at runtime
  +	 *
       void setPrefix(const AxisChar* prefix);
  -
  +	*/
       /**
         * Sets the namespace declaration of the Header Block.
         *
  @@ -332,8 +335,7 @@
         * @param pachPrefix The prefix of this Header Block.
         * @param pachUri The namespace uri of this Header Block.
         */
  -    HeaderBlock(const AxisChar* pachLocalName, const AxisChar* pachPrefix, 
  -        const AxisChar* pachUri);
  +    HeaderBlock(const AxisChar* pachLocalName, const AxisChar* pachUri);
   
       /**
         * The Constructor.
  
  
  
  1.14      +5 -1      ws-axis/c/include/axis/server/IHeaderBlock.h
  
  Index: IHeaderBlock.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/server/IHeaderBlock.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- IHeaderBlock.h	14 Jun 2004 10:20:25 -0000	1.13
  +++ IHeaderBlock.h	21 Jun 2004 13:14:02 -0000	1.14
  @@ -258,12 +258,16 @@
         */
       virtual void setUri(const AxisChar* uri)=0;
   
  -    /**
  +    /*
         * Sets the prefix of this Header Block.
         *
         * @param prefix The prefix to set in.
         */
  +	/* Commented by Susantha - 21/06/2004
  +	 * The prefix should be decided by the Serializer at runtime
  +	 *
       virtual void setPrefix(const AxisChar* prefix)=0;
  +	*/
   #ifdef UNIT_TESTING_ON
       /**
         * Initialized the Header Block for testing.
  
  
  
  1.48      +1 -2      ws-axis/c/src/engine/client/Call.cpp
  
  Index: Call.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/client/Call.cpp,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Call.cpp	14 Jun 2004 08:00:46 -0000	1.47
  +++ Call.cpp	21 Jun 2004 13:14:02 -0000	1.48
  @@ -1,4 +1,3 @@
  -/* -*- C++ -*- */
   /*
    *   Copyright 2003-2004 The Apache Software Foundation.
    *
  @@ -577,7 +576,7 @@
   IHeaderBlock* Call::createHeaderBlock(AxisChar* pachLocalName, 
                                          AxisChar* pachUri)
   {
  -    return (m_pIWSSZ->createHeaderBlock (pachLocalName, pachUri));
  + 	return new HeaderBlock(pachLocalName, pachUri);
   }
   
   int Call::getStatus() 
  
  
  
  1.22      +17 -15    ws-axis/c/src/soap/HeaderBlock.cpp
  
  Index: HeaderBlock.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/HeaderBlock.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- HeaderBlock.cpp	14 Jun 2004 08:00:46 -0000	1.21
  +++ HeaderBlock.cpp	21 Jun 2004 13:14:02 -0000	1.22
  @@ -46,21 +46,20 @@
   HeaderBlock::HeaderBlock()
   {
       iNoOFChildren = 0;
  +	m_sPrefix = "";
   }
   
  -HeaderBlock::HeaderBlock(const AxisChar *pachLocalName, const AxisChar *pachPrefix,
  -                         const AxisChar *pachUri)
  +HeaderBlock::HeaderBlock(const AxisChar *pachLocalName, const AxisChar *pachUri)
   {
       iNoOFChildren = 0;
  -
       m_localname = pachLocalName;
  -    m_prefix = pachPrefix;
       m_uri = pachUri;
  +	m_sPrefix = "";
   }
   
   HeaderBlock::HeaderBlock(const HeaderBlock& rCopy):
   IHeaderBlock(rCopy), iNoOFChildren(rCopy.iNoOFChildren), m_localname(rCopy.m_localname),
  -m_prefix(rCopy.m_prefix), m_uri(rCopy.m_uri)  
  +m_sPrefix(rCopy.m_sPrefix), m_uri(rCopy.m_uri)  
   {
   
       list<BasicNode*>::const_iterator itCurrChild= rCopy.m_children.begin();
  @@ -131,11 +130,14 @@
       m_localname= localname;
   }
   
  +/* Commented by Susantha - 21/06/2004
  + * The prefix should be decided by the Serializer at runtime
  + *
   void HeaderBlock::setPrefix(const AxisChar* prefix)
   {
  -    m_prefix= prefix;
  +    m_sPrefix= prefix;
   }
  -
  +*/
   void HeaderBlock::setUri(const AxisChar* uri)
   {
       m_uri= uri;
  @@ -149,7 +151,7 @@
   int HeaderBlock::serialize(SoapSerializer& pSZ)
   {
       /*
  -     *In the code we don't look whether the m_prefix is available or
  +     *In the code we don't look whether the m_sPrefix is available or
        *    not. Instead directly insert it. The reason is that the SOAP
        *  1.1 spec says that "All immediate child elements of the SOAP 
        *  Header element MUST be namespace-qualified".
  @@ -168,9 +170,9 @@
   
           pSZ.serialize("<", NULL);
   
  -        if(m_prefix.length() == 0)
  +        if(m_sPrefix.length() == 0)
           {
  -            m_prefix = pSZ.getNamespacePrefix(m_uri.c_str(),
  +            m_sPrefix = pSZ.getNamespacePrefix(m_uri.c_str(),
                   blnIsNewNamespace);
               if (blnIsNewNamespace)
               {
  @@ -178,8 +180,8 @@
               }
           }
   
  -        pSZ.serialize(m_prefix.c_str(), ":", m_localname.c_str(),
  -            " xmlns:", m_prefix.c_str(), "=\"", m_uri.c_str(), "\"", NULL);
  +        pSZ.serialize(m_sPrefix.c_str(), ":", m_localname.c_str(),
  +            " xmlns:", m_sPrefix.c_str(), "=\"", m_uri.c_str(), "\"", NULL);
   
           iStatus= attrSerialize(pSZ, lstTmpNameSpaceStack);
           if(iStatus==AXIS_FAIL)
  @@ -201,7 +203,7 @@
               break;
           }
   
  -        pSZ.serialize("</", m_prefix.c_str(), ":", m_localname.c_str(), ">",
  +        pSZ.serialize("</", m_sPrefix.c_str(), ":", m_localname.c_str(), ">",
               NULL);
   
           /*
  @@ -216,7 +218,7 @@
           }
               
       } while(0);
  -
  +	m_sPrefix = "";
       return iStatus;
   }
   
  @@ -250,7 +252,7 @@
       }
       else
       {
  -        if(m_prefix.length() == 0)
  +        if(m_sPrefix.length() == 0)
           {
               if(m_uri.length() != 0)
               {
  
  
  
  1.60      +1 -2      ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- SoapSerializer.cpp	14 Jun 2004 14:15:34 -0000	1.59
  +++ SoapSerializer.cpp	21 Jun 2004 13:14:02 -0000	1.60
  @@ -860,8 +860,7 @@
   IHeaderBlock* SoapSerializer::createHeaderBlock(AxisChar *pachLocalName, 
                                                   AxisChar *pachUri)
   {
  -    HeaderBlock* pHeaderBlock= new HeaderBlock(pachLocalName, 
  -        getNamespacePrefix(pachUri), pachUri);
  +    HeaderBlock* pHeaderBlock= new HeaderBlock(pachLocalName, pachUri);
       setHeaderBlock(pHeaderBlock);
       return pHeaderBlock;    
   }
  
  
  
  1.21      +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
  
  Index: ClientStubHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ClientStubHeaderWriter.java	15 Jun 2004 13:47:00 -0000	1.20
  +++ ClientStubHeaderWriter.java	21 Jun 2004 13:14:02 -0000	1.21
  @@ -85,7 +85,7 @@
   	 */
   	protected void writeConstructors() throws WrapperFault {
   		try{
  -		writer.write("public:\n\t"+classname+"(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol);\n");
  +		writer.write("public:\n\t"+classname+"(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol=APTHTTP);\n");
   		writer.write("\t"+classname+"();\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
  
  
  
  1.15      +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java
  
  Index: ClientStubHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubHeaderWriter.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ClientStubHeaderWriter.java	15 Jun 2004 13:47:22 -0000	1.14
  +++ ClientStubHeaderWriter.java	21 Jun 2004 13:14:02 -0000	1.15
  @@ -90,7 +90,7 @@
   	 */
   	protected void writeConstructors() throws WrapperFault {
   		try{
  -			writer.write("public:\n\t"+classname+"(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol);\n");
  +			writer.write("public:\n\t"+classname+"(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol=APTHTTP);\n");
   			writer.write("\t"+classname+"();\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
  
  
  
  1.1                  ws-axis/c/tests/alltests.dsw
  
  Index: alltests.dsw
  ===================================================================
  Microsoft Developer Studio Workspace File, Format Version 6.00
  # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
  
  ###############################################################################
  
  Project: "StubBase"=".\CLIENT\STUBTEST\StubBase\StubBase.dsp" - Package Owner=<4>
  
  Package=<5>
  {{{
  }}}
  
  Package=<4>
  {{{
  }}}
  
  ###############################################################################
  
  Global:
  
  Package=<5>
  {{{
  }}}
  
  Package=<3>
  {{{
  }}}
  
  ###############################################################################
  
  
  
  
  1.9       +1 -1      ws-axis/c/tests/client/stubTest/stubBase/InteropBaseClient.cpp
  
  Index: InteropBaseClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/stubTest/stubBase/InteropBaseClient.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- InteropBaseClient.cpp	14 Jun 2004 08:00:47 -0000	1.8
  +++ InteropBaseClient.cpp	21 Jun 2004 13:14:02 -0000	1.9
  @@ -46,7 +46,7 @@
       printf("Usage :\n %s <server> <port>\n\n", argv[0]);
       //sprintf(endpoint, "http://%s:%s/axis/base", server, port);
       //endpoint for Axis Java sample
  -    sprintf(endpoint, "http://%s:%s/axis/services/echo", server, port);
  +    sprintf(endpoint, "http://%s:%s/axis/base", server, port);
       InteropTestPortType ws(endpoint);
   
       //set end point (optional) 
  
  
  
  1.2       +2 -2      ws-axis/c/tests/client/stubTest/stubBase/InteropTestPortType.cpp
  
  Index: InteropTestPortType.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/stubTest/stubBase/InteropTestPortType.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InteropTestPortType.cpp	26 May 2004 10:00:46 -0000	1.1
  +++ InteropTestPortType.cpp	21 Jun 2004 13:14:02 -0000	1.2
  @@ -16,8 +16,8 @@
   extern int Axis_Serialize_SOAPStruct(SOAPStruct* param, IWrapperSoapSerializer* pSZ, bool
bArray = false);
   extern int Axis_GetSize_SOAPStruct();
   
  -InteropTestPortType::InteropTestPortType(const char* pchEndpointUri)
  -:Stub(pchEndpointUri)
  +InteropTestPortType::InteropTestPortType(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE
eProtocol)
  +:Stub(pchEndpointUri, eProtocol)
   {
   }
   
  
  
  
  1.2       +1 -1      ws-axis/c/tests/client/stubTest/stubBase/InteropTestPortType.h
  
  Index: InteropTestPortType.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/stubTest/stubBase/InteropTestPortType.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InteropTestPortType.h	26 May 2004 10:00:46 -0000	1.1
  +++ InteropTestPortType.h	21 Jun 2004 13:14:02 -0000	1.2
  @@ -13,7 +13,7 @@
   class InteropTestPortType :public Stub 
   {
   public:
  -	InteropTestPortType(const char* pchEndpointUri);
  +	InteropTestPortType(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol=APTHTTP);
   	virtual ~InteropTestPortType();
   public: 
   	xsd__string echoString(xsd__string Value0);
  
  
  
  1.1                  ws-axis/c/tests/client/stubTest/stubBase/StubBase.dsp
  
  Index: StubBase.dsp
  ===================================================================
  # Microsoft Developer Studio Project File - Name="StubBase" - Package Owner=<4>
  # Microsoft Developer Studio Generated Build File, Format Version 6.00
  # ** DO NOT EDIT **
  
  # TARGTYPE "Win32 (x86) Console Application" 0x0103
  
  CFG=StubBase - Win32 Debug
  !MESSAGE This is not a valid makefile. To build this project using NMAKE,
  !MESSAGE use the Export Makefile command and run
  !MESSAGE 
  !MESSAGE NMAKE /f "StubBase.mak".
  !MESSAGE 
  !MESSAGE You can specify a configuration when running NMAKE
  !MESSAGE by defining the macro CFG on the command line. For example:
  !MESSAGE 
  !MESSAGE NMAKE /f "StubBase.mak" CFG="StubBase - Win32 Debug"
  !MESSAGE 
  !MESSAGE Possible choices for configuration are:
  !MESSAGE 
  !MESSAGE "StubBase - Win32 Release" (based on "Win32 (x86) Console Application")
  !MESSAGE "StubBase - Win32 Debug" (based on "Win32 (x86) Console Application")
  !MESSAGE 
  
  # Begin Project
  # PROP AllowPerConfigDependencies 0
  # PROP Scc_ProjName ""
  # PROP Scc_LocalPath ""
  CPP=cl.exe
  RSC=rc.exe
  
  !IF  "$(CFG)" == "StubBase - Win32 Release"
  
  # PROP BASE Use_MFC 0
  # PROP BASE Use_Debug_Libraries 0
  # PROP BASE Output_Dir "Release"
  # PROP BASE Intermediate_Dir "Release"
  # PROP BASE Target_Dir ""
  # PROP Use_MFC 0
  # PROP Use_Debug_Libraries 0
  # PROP Output_Dir "Release"
  # PROP Intermediate_Dir "Release"
  # PROP Ignore_Export_Lib 0
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD
/c
  # ADD CPP /nologo /W3 /GX /O2 /I "../../../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE"
/D "_MBCS" /YX /FD /c
  # ADD BASE RSC /l 0x409 /d "NDEBUG"
  # ADD RSC /l 0x409 /d "NDEBUG"
  BSC32=bscmake.exe
  # ADD BASE BSC32 /nologo
  # ADD BSC32 /nologo
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
  # ADD LINK32 AxisClient.lib /nologo /subsystem:console /machine:I386 /out:"../../../../bin/StubBase.exe"
/libpath:"../../../../bin"
  
  !ELSEIF  "$(CFG)" == "StubBase - Win32 Debug"
  
  # PROP BASE Use_MFC 0
  # PROP BASE Use_Debug_Libraries 1
  # PROP BASE Output_Dir "Debug"
  # PROP BASE Intermediate_Dir "Debug"
  # PROP BASE Target_Dir ""
  # PROP Use_MFC 0
  # PROP Use_Debug_Libraries 1
  # PROP Output_Dir "Debug"
  # PROP Intermediate_Dir "Debug"
  # PROP Ignore_Export_Lib 0
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS"
/YX /FD /GZ  /c
  # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../../include" /D "WIN32" /D "_DEBUG" /D
"_CONSOLE" /D "_MBCS" /YX /FD /GZ  /c
  # ADD BASE RSC /l 0x409 /d "_DEBUG"
  # ADD RSC /l 0x409 /d "_DEBUG"
  BSC32=bscmake.exe
  # ADD BASE BSC32 /nologo
  # ADD BSC32 /nologo
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  kernel32.lib user32.lib
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
  # ADD LINK32 AxisClient_D.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../../bin/StubBase_D.exe"
/pdbtype:sept /libpath:"../../../../bin"
  
  !ENDIF 
  
  # Begin Target
  
  # Name "StubBase - Win32 Release"
  # Name "StubBase - Win32 Debug"
  # Begin Group "Source Files"
  
  # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
  # Begin Source File
  
  SOURCE=.\InteropBaseClient.cpp
  # End Source File
  # Begin Source File
  
  SOURCE=.\InteropTestPortType.cpp
  # End Source File
  # Begin Source File
  
  SOURCE=.\SOAPStruct.cpp
  # End Source File
  # End Group
  # Begin Group "Header Files"
  
  # PROP Default_Filter "h;hpp;hxx;hm;inl"
  # Begin Source File
  
  SOURCE=.\InteropTestPortType.h
  # End Source File
  # Begin Source File
  
  SOURCE=.\SOAPStruct.h
  # End Source File
  # Begin Source File
  
  SOURCE=.\SOAPStruct_Array.h
  # End Source File
  # End Group
  # Begin Group "Resource Files"
  
  # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
  # End Group
  # End Target
  # End Project
  
  
  

Mime
View raw message