You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by li...@apache.org on 2003/07/08 11:41:35 UTC
cvs commit: xml-axis/c/src/server/iis/mod_axis_isapi mod_axis_isapi.cpp mod_axis_isapi.def mod_axis_isapi.dsp mod_axis_isapi.dsw mod_axis_isapi.h
lilantha 2003/07/08 02:41:35
Added: c/src/server/iis/mod_axis_isapi mod_axis_isapi.cpp
mod_axis_isapi.def mod_axis_isapi.dsp
mod_axis_isapi.dsw mod_axis_isapi.h
Log:
add - ISAPI handler for server side
Revision Changes Path
1.1 xml-axis/c/src/server/iis/mod_axis_isapi/mod_axis_isapi.cpp
Index: mod_axis_isapi.cpp
===================================================================
#include "mod_axis_isapi.h"
DWORD WINAPI HttpExtensionProc(IN EXTENSION_CONTROL_BLOCK *pECB)
{
static char szMessage[] =
"<hello>Go to hell</hello>\r\n";
HSE_SEND_HEADER_EX_INFO HeaderExInfo;
// prepare headers
HeaderExInfo.pszStatus = "200 OK";
HeaderExInfo.pszHeader = "Content-type: text/xml\r\n\r\n";
HeaderExInfo.cchStatus = strlen(HeaderExInfo.pszStatus);
HeaderExInfo.cchHeader = strlen(HeaderExInfo.pszHeader);
HeaderExInfo.fKeepConn = FALSE;
// send headers using IIS-provided callback
//
// Note - if we needed to keep connection open, we would set fKeepConn
// to TRUE *and* we would need to provide correct Content-Length: header
pECB->ServerSupportFunction(pECB->ConnID, HSE_REQ_SEND_RESPONSE_HEADER_EX, &HeaderExInfo, NULL, NULL);
// Calculate length of string to output to client
DWORD dwBytesToWrite = strlen( szMessage );
// send text using IIS-provied callback
pECB->WriteClient( pECB->ConnID, szMessage, &dwBytesToWrite, 0 );
// Indicate that the call to HttpExtensionProc was successful
return HSE_STATUS_SUCCESS;
}
BOOL WINAPI TerminateExtension(IN DWORD dwFlags)
{
// Note: We must not agree to be unloaded if we have any pending requests.
return TRUE;
}
BOOL WINAPI DllMain(IN HINSTANCE hinstDll, IN DWORD dwReason, IN LPVOID lpvContext)
{
// Note that appropriate initialization and termination code
// would be written within the switch statement below. Because
// this example is very simple, none is currently needed.
switch(dwReason) {
case DLL_PROCESS_ATTACH :
break;
case DLL_PROCESS_DETACH :
break;
}
return TRUE;
}
BOOL WINAPI GetExtensionVersion(OUT HSE_VERSION_INFO *pVer)
{
pVer->dwExtensionVersion = MAKELONG(HSE_VERSION_MINOR, HSE_VERSION_MAJOR);
lstrcpyn(pVer->lpszExtensionDesc, "IIS SDK Simple ISAPI Extension", HSE_MAX_EXT_DLL_NAME_LEN - 1);
return TRUE;
}
1.1 xml-axis/c/src/server/iis/mod_axis_isapi/mod_axis_isapi.def
Index: mod_axis_isapi.def
===================================================================
; MOD_AXIS_ISAPI.def : declares the module parameters for the DLL.
LIBRARY "MOD_AXIS_ISAPI"
EXPORTS
HttpExtensionProc
GetExtensionVersion
TerminateExtension
1.1 xml-axis/c/src/server/iis/mod_axis_isapi/mod_axis_isapi.dsp
Index: mod_axis_isapi.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="mod_axis_isapi" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=mod_axis_isapi - 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 "mod_axis_isapi.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 "mod_axis_isapi.mak" CFG="mod_axis_isapi - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mod_axis_isapi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "mod_axis_isapi - 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)" == "mod_axis_isapi - Win32 Release"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 2
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 /nologo /subsystem:windows /dll /machine:I386
!ELSEIF "$(CFG)" == "mod_axis_isapi - Win32 Debug"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 2
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /D "_USRDLL" /D "AXIS_ISAPI_EXPORTS" /Yu"stdafx.h" /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" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "mod_axis_isapi - Win32 Release"
# Name "mod_axis_isapi - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\mod_axis_isapi.cpp
!IF "$(CFG)" == "mod_axis_isapi - Win32 Release"
!ELSEIF "$(CFG)" == "mod_axis_isapi - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=.\mod_axis_isapi.def
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\mod_axis_isapi.h
# End Source File
# End Group
# End Target
# End Project
1.1 xml-axis/c/src/server/iis/mod_axis_isapi/mod_axis_isapi.dsw
Index: mod_axis_isapi.dsw
===================================================================
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "mod_axis_isapi"=.\mod_axis_isapi.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
1.1 xml-axis/c/src/server/iis/mod_axis_isapi/mod_axis_isapi.h
Index: mod_axis_isapi.h
===================================================================
#if !defined(_MOD_AXIS_ISAPI_H)
#define _MOD_AXIS_ISAPI_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <httpext.h>
#endif // !defined(_MOD_AXIS_ISAPI_H)