Return-Path: Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 41307 invoked by uid 500); 5 Aug 2003 12:50:35 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 41242 invoked by uid 500); 5 Aug 2003 12:50:35 -0000 Delivered-To: apmail-xml-axis-cvs@apache.org Date: 5 Aug 2003 12:50:37 -0000 Message-ID: <20030805125037.95038.qmail@minotaur.apache.org> From: roshan@apache.org To: xml-axis-cvs@apache.org Subject: cvs commit: xml-axis/c/vc/server/handlers handlers.dsw X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N roshan 2003/08/05 05:50:37 Modified: c/vc/server/handlers handlers.dsw Added: c/src/server/handlers/custom/echoStringHeaderHandler EchoStringHeaderHandler.cpp ESHHandler.cpp ESHHandler.h c/vc/server/handlers/custom/echoStringHeaderHandler echoStringHeaderHandler.dsp echoStringHeaderHandler.plg Log: added new Handlers for Header Processing Revision Changes Path 1.1 xml-axis/c/src/server/handlers/custom/echoStringHeaderHandler/EchoStringHeaderHandler.cpp Index: EchoStringHeaderHandler.cpp =================================================================== /* -*- C++ -*- */ /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "SOAP" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * * * * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk) * */ // EchoStringHeaderHandler.cpp: implementation of the EchoStringHeaderHandler class. // ////////////////////////////////////////////////////////////////////// #ifdef WIN32 #define STORAGE_CLASS_INFO __declspec(dllexport) #else #define STORAGE_CLASS_INFO #endif #include "ESHHandler.h" #include "../../../../common/GDefine.h" extern "C" { //the two export functions//////////////////////////////////////////// //Following describes how the export function of the handler DLLs (or .so s) STORAGE_CLASS_INFO int GetClassInstance(Handler **inst) { *inst = new ESHHandler(); if (*inst) { return SUCCESS; } return FAIL; } STORAGE_CLASS_INFO int DestroyInstance(Handler *inst) { if (inst) { delete inst; return SUCCESS; } return FAIL; } } 1.1 xml-axis/c/src/server/handlers/custom/echoStringHeaderHandler/ESHHandler.cpp Index: ESHHandler.cpp =================================================================== /* -*- C++ -*- */ /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "SOAP" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * * * * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk) * */ // ESHHandler.cpp: implementation of the ESHHandler class. // ////////////////////////////////////////////////////////////////////// #include "ESHHandler.h" #include "../../../../common/GDefine.h" #include "../../../../common/IHandlerSoapSerializer.h" #include "../../../../common/IHandlerSoapDeSerializer.h" #include "../../../../soap/HeaderBlock.h" #include "../../../../soap/SoapHeader.h" #include "../../../../soap/BasicNode.h" #include ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// ESHHandler::ESHHandler() { } ESHHandler::~ESHHandler() { } string ESHHandler::GetOption(string sArg) { return NULL; } void ESHHandler::SetOption(string sOption, string Value) { } void ESHHandler::SetOptionList(map* OptionList) { } int ESHHandler::Invoke(IMessageData *pIMsg) { if(pIMsg->isPastPivot()) { //this is a response IHandlerSoapSerializer* pISZ; pIMsg->getSoapSerializer(&pISZ); IHeaderBlock* pIHeaderBlock= pISZ->createHeaderBlock(); pIHeaderBlock->setLocalName("echoMeStringResponse"); pIHeaderBlock->setUri("http://soapinterop.org/echoheader/"); pIHeaderBlock->setPrefix("m"); string sHeaderVal= pIMsg->getProperty(string("EchoStringHeaderHandlerPr1.id")); sHeaderVal+= " After Append by Handler"; pIHeaderBlock->setValue(sHeaderVal); BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE); pBasicNode->setValue(sHeaderVal); pIHeaderBlock->addChild(pBasicNode); cout<<"in the header invoke"<getSoapDeSerializer(&pIHandlerSoapDeSerializer); ISoapHeader* pISoapHeader= pIHandlerSoapDeSerializer->GetHeader(); IHeaderBlock* pIHeaderBlock= pISoapHeader->getHeaderBlock(); BasicNode* pBasicNode= pIHeaderBlock->getFirstChild(); string sHeaderValue; if((pBasicNode->getNodeType()) == CHARACTER_NODE) { sHeaderValue= pBasicNode->getValue(); } pIMsg->setProperty(string("EchoStringHeaderHandlerPr1.id"), sHeaderValue); //pIMsg->setProperty(string("EchoSt"), sHeaderValue); } return SUCCESS; } void ESHHandler::OnFault(IMessageData *pIMsg) { } 1.1 xml-axis/c/src/server/handlers/custom/echoStringHeaderHandler/ESHHandler.h Index: ESHHandler.h =================================================================== /* -*- C++ -*- */ /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "SOAP" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * * * * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk) * */ // ESHHandler.h: interface for the ESHHandler class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_ESHHANDLER_H__E18001B4_4855_4FDB_AE92_CA7D5C59ABD7__INCLUDED_) #define AFX_ESHHANDLER_H__E18001B4_4855_4FDB_AE92_CA7D5C59ABD7__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "../../../../common/Handler.h" class ESHHandler : public Handler { public: void OnFault(IMessageData* pIMsg); int Invoke(IMessageData* pIMsg); void SetOptionList(map* OptionList); void SetOption(string sOption, string Value); string GetOption(string sArg); ESHHandler(); virtual ~ESHHandler(); }; #endif // !defined(AFX_ESHHANDLER_H__E18001B4_4855_4FDB_AE92_CA7D5C59ABD7__INCLUDED_) 1.1 xml-axis/c/vc/server/handlers/custom/echoStringHeaderHandler/echoStringHeaderHandler.dsp Index: echoStringHeaderHandler.dsp =================================================================== # Microsoft Developer Studio Project File - Name="echoStringHeaderHandler" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=echoStringHeaderHandler - 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 "echoStringHeaderHandler.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 "echoStringHeaderHandler.mak" CFG="echoStringHeaderHandler - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "echoStringHeaderHandler - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "echoStringHeaderHandler - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "echoStringHeaderHandler - 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 Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ECHOSTRINGHEADERHANDLER_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ECHOSTRINGHEADERHANDLER_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # 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 /nologo /dll /machine:I386 # ADD 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 /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "echoStringHeaderHandler - 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 "../../../../../release/win32" # PROP Intermediate_Dir "../../../../../bin/win32/handlers/custom/echoStringHeaderHandler" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ECHOSTRINGHEADERHANDLER_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ECHOSTRINGHEADERHANDLER_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # 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 /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "echoStringHeaderHandler - Win32 Release" # Name "echoStringHeaderHandler - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\..\..\..\..\src\server\handlers\custom\echoStringHeaderHandler\EchoStringHeaderHandler.cpp # End Source File # Begin Source File SOURCE=..\..\..\..\..\src\server\handlers\custom\echoStringHeaderHandler\ESHHandler.cpp # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\..\..\..\..\src\server\handlers\custom\echoStringHeaderHandler\ESHHandler.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 1.1 xml-axis/c/vc/server/handlers/custom/echoStringHeaderHandler/echoStringHeaderHandler.plg Index: echoStringHeaderHandler.plg ===================================================================
  

Build Log

--------------------Configuration: echoStringHeaderHandler - Win32 Debug--------------------

Command Lines

Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP813.tmp" with contents [ /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ECHOSTRINGHEADERHANDLER_EXPORTS" /Fp"../../../../../bin/win32/handlers/custom/echoStringHeaderHandler/echoStringHeaderHandler.pch" /YX /Fo"../../../../../bin/win32/handlers/custom/echoStringHeaderHandler/" /Fd"../../../../../bin/win32/handlers/custom/echoStringHeaderHandler/" /FD /GZ /c "C:\axiscppdev\xml-axis\c\src\server\handlers\custom\echoStringHeaderHandler\EchoStringHeaderHandler.cpp" "C:\axiscppdev\xml-axis\c\src\server\handlers\custom\echoStringHeaderHandler\ESHHandler.cpp" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP813.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP814.tmp" with contents [ /nologo /dll /incremental:yes /pdb:"../../../../../release/win32/echoStringHeaderHandler.pdb" /debug /machine:I386 /out:"../../../../../release/win32/echoStringHeaderHandler.dll" /implib:"../../../../../release/win32/echoStringHeaderHandler.lib" /pdbtype:sept "\axiscppdev\xml-axis\c\bin\win32\handlers\custom\echoStringHeaderHandler\EchoStringHeaderHandler.obj" "\axiscppdev\xml-axis\c\bin\win32\handlers\custom\echoStringHeaderHandler\ESHHandler.obj" ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP814.tmp"

Output Window

Compiling... EchoStringHeaderHandler.cpp ESHHandler.cpp Linking... Creating library ../../../../../release/win32/echoStringHeaderHandler.lib and object ../../../../../release/win32/echoStringHeaderHandler.exp

Results

echoStringHeaderHandler.dll - 0 error(s), 0 warning(s)
1.3 +1 -1 xml-axis/c/vc/server/handlers/handlers.dsw Index: handlers.dsw =================================================================== RCS file: /home/cvs/xml-axis/c/vc/server/handlers/handlers.dsw,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- handlers.dsw 29 Jul 2003 12:35:22 -0000 1.2 +++ handlers.dsw 5 Aug 2003 12:50:37 -0000 1.3 @@ -3,7 +3,7 @@ ############################################################################### -Project: "echoHeaderStringHandler"=".\CUSTOM\echoHeaderStringHandler\echoHeaderStringHandler.dsp" - Package Owner=<4> +Project: "echoStringHeaderHandler"=".\custom\echoStringHeaderHandler\echoStringHeaderHandler.dsp" - Package Owner=<4> Package=<5> {{{