diff options
author | rans | 2004-08-26 16:57:41 +0000 |
---|---|---|
committer | rans | 2004-08-26 16:57:41 +0000 |
commit | 24339ea4d5b15c1a61ada7b9ea8a935ddfc76dce (patch) | |
tree | 0d812e8ba18287285a80f68f09cc35938348b4b4 | |
parent | 5dca2c3c0205d576ac59a0e52bdeb4fb56abf9b9 (diff) | |
download | csoap-24339ea4d5b15c1a61ada7b9ea8a935ddfc76dce.tar.gz csoap-24339ea4d5b15c1a61ada7b9ea8a935ddfc76dce.tar.bz2 |
CSoapServer
-rw-r--r-- | csoapserver/app.ico | bin | 0 -> 1078 bytes | |||
-rw-r--r-- | csoapserver/app.rc | 52 | ||||
-rw-r--r-- | csoapserver/csoapserver.cpp | 71 | ||||
-rw-r--r-- | csoapserver/csoapserver.vcproj | 171 | ||||
-rw-r--r-- | csoapserver/iconv.dll | bin | 0 -> 888832 bytes | |||
-rw-r--r-- | csoapserver/libxml2.dll | bin | 0 -> 780288 bytes | |||
-rw-r--r-- | csoapserver/pthreadVC.dll | bin | 0 -> 53299 bytes | |||
-rw-r--r-- | csoapserver/stdafx.cpp | 7 | ||||
-rw-r--r-- | csoapserver/stdafx.h | 9 |
9 files changed, 310 insertions, 0 deletions
diff --git a/csoapserver/app.ico b/csoapserver/app.ico Binary files differnew file mode 100644 index 0000000..3a5525f --- /dev/null +++ b/csoapserver/app.ico diff --git a/csoapserver/app.rc b/csoapserver/app.rc new file mode 100644 index 0000000..6be44ad --- /dev/null +++ b/csoapserver/app.rc @@ -0,0 +1,52 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon placed first or with lowest ID value becomes application icon + +LANGUAGE 9, 1 +#pragma code_page(1252) +1 ICON "app.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" + "\0" +END + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/csoapserver/csoapserver.cpp b/csoapserver/csoapserver.cpp new file mode 100644 index 0000000..985e5fe --- /dev/null +++ b/csoapserver/csoapserver.cpp @@ -0,0 +1,71 @@ +// This is the main project file for VC++ application project +// generated using an Application Wizard. + +#include "stdafx.h" +#include <libcsoap/soap-server.h> + + +static const char *url = "/csoapserver"; +static const char *urn = "urn:examples"; +static const char *method = "sayHello"; + + +void add_name(xmlNodePtr node, SoapEnv *env) +{ + char *name; + name = (char*)xmlNodeListGetString(node->doc, + node->xmlChildrenNode, 1); + + + if (!name) return; + + soap_env_add_itemf(env,"xsd:string", "echo", + "Hello '%s'", name); + + xmlFree((xmlChar*)name); + +} + + +SoapEnv* say_hello(SoapEnv *request) +{ + + SoapEnv *env; + xmlNodePtr method, node; + + env = soap_env_new_with_response(request); + + method = soap_env_get_method(request); + node = soap_xml_get_children(method); + + while (node) { + add_name(node, env); + node = soap_xml_get_next(node); + } + + return env; +} + +int _tmain(int argc, _TCHAR* argv[]) +{ + + SoapRouter *router; + + log_set_level(HLOG_VERBOSE); + + if (!soap_server_init_args(argc, argv)) { + return 0; + } + + router = soap_router_new(); + soap_router_register_service(router, say_hello, method, urn); + soap_server_register_router(router, url); + + log_info1("send SIGTERM to shutdown"); + soap_server_run(); + + log_info1("shutting down\n"); + soap_server_destroy(); + + return 0; +} diff --git a/csoapserver/csoapserver.vcproj b/csoapserver/csoapserver.vcproj new file mode 100644 index 0000000..fab9a76 --- /dev/null +++ b/csoapserver/csoapserver.vcproj @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="csoapserver" + ProjectGUID="{B330E865-6271-42DD-9DF4-6F32E934715E}" + RootNamespace="csoapserver" + Keyword="ManagedCProj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + ManagedExtensions="FALSE" + ReferencesPath=""> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\,..\libcsoap" + PreprocessorDefinitions="WIN32;_DEBUG" + MinimalRebuild="TRUE" + BasicRuntimeChecks="0" + RuntimeLibrary="5" + DefaultCharIsUnsigned="FALSE" + UsePrecompiledHeader="3" + WarningLevel="3" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="nanohttp.lib libcsoap.lib libxml2.lib pthreadvc.lib" + OutputFile="$(OutDir)\$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="..\nanohttp\Debug;..\libcsoap\Debug,..\" + IgnoreAllDefaultLibraries="FALSE" + GenerateDebugInformation="TRUE" + AssemblyDebug="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + ManagedExtensions="FALSE"> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\,..\libcsoap" + PreprocessorDefinitions="WIN32;NDEBUG" + MinimalRebuild="FALSE" + RuntimeLibrary="4" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="nanohttp.lib libcsoap.lib libxml2.lib pthreadvc.lib" + OutputFile="$(OutDir)\$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="..\nanohttp\Release;..\libcsoap\Release,..\" + IgnoreDefaultLibraryNames="" + GenerateDebugInformation="TRUE"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + <AssemblyReference + RelativePath="mscorlib.dll"/> + <AssemblyReference + RelativePath="System.dll"/> + <AssemblyReference + RelativePath="System.Data.dll"/> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath=".\csoapserver.cpp"> + </File> + <File + RelativePath=".\stdafx.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1"/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1"/> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath=".\stdafx.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + <File + RelativePath=".\app.ico"> + </File> + <File + RelativePath=".\app.rc"> + </File> + </Filter> + <File + RelativePath=".\ReadMe.txt"> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/csoapserver/iconv.dll b/csoapserver/iconv.dll Binary files differnew file mode 100644 index 0000000..b448e7d --- /dev/null +++ b/csoapserver/iconv.dll diff --git a/csoapserver/libxml2.dll b/csoapserver/libxml2.dll Binary files differnew file mode 100644 index 0000000..410c208 --- /dev/null +++ b/csoapserver/libxml2.dll diff --git a/csoapserver/pthreadVC.dll b/csoapserver/pthreadVC.dll Binary files differnew file mode 100644 index 0000000..4fc1f00 --- /dev/null +++ b/csoapserver/pthreadVC.dll diff --git a/csoapserver/stdafx.cpp b/csoapserver/stdafx.cpp new file mode 100644 index 0000000..f0977a2 --- /dev/null +++ b/csoapserver/stdafx.cpp @@ -0,0 +1,7 @@ +// stdafx.cpp : source file that includes just the standard includes +// csoapserver.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + diff --git a/csoapserver/stdafx.h b/csoapserver/stdafx.h new file mode 100644 index 0000000..f3469f3 --- /dev/null +++ b/csoapserver/stdafx.h @@ -0,0 +1,9 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include <iostream> +#include <tchar.h> + +// TODO: reference additional headers your program requires here |