Neuer Webservice für Michael (Abgleich NSW -> Wetris)
This commit is contained in:
parent
ffee75d18a
commit
6396a214b3
36
nsw/Source/bsmd.nsw.service/IService.cs
Normal file
36
nsw/Source/bsmd.nsw.service/IService.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.ServiceModel;
|
||||||
|
using System.ServiceModel.Web;
|
||||||
|
using System.Text;
|
||||||
|
using bsmd.database;
|
||||||
|
|
||||||
|
namespace bsmd.nsw.service
|
||||||
|
{
|
||||||
|
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
|
||||||
|
[ServiceContract]
|
||||||
|
public interface IService
|
||||||
|
{
|
||||||
|
|
||||||
|
[OperationContract]
|
||||||
|
NSWEntry[] GetData(string poc, DateTime? from , DateTime? to);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[DataContract]
|
||||||
|
public class NSWEntry
|
||||||
|
{
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
public string PoC;
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
public STAT STAT { get; set; }
|
||||||
|
|
||||||
|
[DataMember]
|
||||||
|
public NOA_NOD NOA_NOD { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
36
nsw/Source/bsmd.nsw.service/Properties/AssemblyInfo.cs
Normal file
36
nsw/Source/bsmd.nsw.service/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("bsmd.nsw.service")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("bsmd.nsw.service")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("ac61d284-d3c1-4139-86a1-83459dc1c4e0")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
1
nsw/Source/bsmd.nsw.service/Service.svc
Normal file
1
nsw/Source/bsmd.nsw.service/Service.svc
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%@ ServiceHost Language="C#" Debug="true" Service="bsmd.nsw.service.Service1" CodeBehind="Service.svc.cs" %>
|
||||||
33
nsw/Source/bsmd.nsw.service/Service.svc.cs
Normal file
33
nsw/Source/bsmd.nsw.service/Service.svc.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
using System.ServiceModel;
|
||||||
|
using System.ServiceModel.Web;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace bsmd.nsw.service
|
||||||
|
{
|
||||||
|
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
|
||||||
|
// NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging.
|
||||||
|
public class Service1 : IService
|
||||||
|
{
|
||||||
|
public string GetData(int value)
|
||||||
|
{
|
||||||
|
return string.Format("You entered: {0}", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CompositeType GetDataUsingDataContract(CompositeType composite)
|
||||||
|
{
|
||||||
|
if (composite == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("composite");
|
||||||
|
}
|
||||||
|
if (composite.BoolValue)
|
||||||
|
{
|
||||||
|
composite.StringValue += "Suffix";
|
||||||
|
}
|
||||||
|
return composite;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
nsw/Source/bsmd.nsw.service/Web.Debug.config
Normal file
30
nsw/Source/bsmd.nsw.service/Web.Debug.config
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
|
||||||
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
<!--
|
||||||
|
In the example below, the "SetAttributes" transform will change the value of
|
||||||
|
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||||
|
finds an attribute "name" that has a value of "MyDB".
|
||||||
|
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="MyDB"
|
||||||
|
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||||
|
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||||
|
</connectionStrings>
|
||||||
|
-->
|
||||||
|
<system.web>
|
||||||
|
<!--
|
||||||
|
In the example below, the "Replace" transform will replace the entire
|
||||||
|
<customErrors> section of your web.config file.
|
||||||
|
Note that because there is only one customErrors section under the
|
||||||
|
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||||
|
|
||||||
|
<customErrors defaultRedirect="GenericError.htm"
|
||||||
|
mode="RemoteOnly" xdt:Transform="Replace">
|
||||||
|
<error statusCode="500" redirect="InternalError.htm"/>
|
||||||
|
</customErrors>
|
||||||
|
-->
|
||||||
|
</system.web>
|
||||||
|
</configuration>
|
||||||
31
nsw/Source/bsmd.nsw.service/Web.Release.config
Normal file
31
nsw/Source/bsmd.nsw.service/Web.Release.config
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
|
||||||
|
|
||||||
|
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||||
|
<!--
|
||||||
|
In the example below, the "SetAttributes" transform will change the value of
|
||||||
|
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
|
||||||
|
finds an attribute "name" that has a value of "MyDB".
|
||||||
|
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="MyDB"
|
||||||
|
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
|
||||||
|
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
|
||||||
|
</connectionStrings>
|
||||||
|
-->
|
||||||
|
<system.web>
|
||||||
|
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||||
|
<!--
|
||||||
|
In the example below, the "Replace" transform will replace the entire
|
||||||
|
<customErrors> section of your web.config file.
|
||||||
|
Note that because there is only one customErrors section under the
|
||||||
|
<system.web> node, there is no need to use the "xdt:Locator" attribute.
|
||||||
|
|
||||||
|
<customErrors defaultRedirect="GenericError.htm"
|
||||||
|
mode="RemoteOnly" xdt:Transform="Replace">
|
||||||
|
<error statusCode="500" redirect="InternalError.htm"/>
|
||||||
|
</customErrors>
|
||||||
|
-->
|
||||||
|
</system.web>
|
||||||
|
</configuration>
|
||||||
36
nsw/Source/bsmd.nsw.service/Web.config
Normal file
36
nsw/Source/bsmd.nsw.service/Web.config
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
|
||||||
|
<appSettings>
|
||||||
|
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
|
||||||
|
</appSettings>
|
||||||
|
<system.web>
|
||||||
|
<compilation debug="true" targetFramework="4.5.2" />
|
||||||
|
<httpRuntime targetFramework="4.5.2"/>
|
||||||
|
</system.web>
|
||||||
|
<system.serviceModel>
|
||||||
|
<behaviors>
|
||||||
|
<serviceBehaviors>
|
||||||
|
<behavior>
|
||||||
|
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
|
||||||
|
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
|
||||||
|
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
|
||||||
|
<serviceDebug includeExceptionDetailInFaults="false"/>
|
||||||
|
</behavior>
|
||||||
|
</serviceBehaviors>
|
||||||
|
</behaviors>
|
||||||
|
<protocolMapping>
|
||||||
|
<add binding="basicHttpsBinding" scheme="https" />
|
||||||
|
</protocolMapping>
|
||||||
|
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
|
||||||
|
</system.serviceModel>
|
||||||
|
<system.webServer>
|
||||||
|
<modules runAllManagedModulesForAllRequests="true"/>
|
||||||
|
<!--
|
||||||
|
To browse web app root directory during debugging, set the value below to true.
|
||||||
|
Set to false before deployment to avoid disclosing web app folder information.
|
||||||
|
-->
|
||||||
|
<directoryBrowse enabled="true"/>
|
||||||
|
</system.webServer>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
123
nsw/Source/bsmd.nsw.service/bsmd.nsw.service.csproj
Normal file
123
nsw/Source/bsmd.nsw.service/bsmd.nsw.service.csproj
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>
|
||||||
|
</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{AC61D284-D3C1-4139-86A1-83459DC1C4E0}</ProjectGuid>
|
||||||
|
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>bsmd.nsw.service</RootNamespace>
|
||||||
|
<AssemblyName>bsmd.nsw.service</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
|
<WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<UseIISExpress>true</UseIISExpress>
|
||||||
|
<Use64BitIISExpress />
|
||||||
|
<IISExpressSSLPort />
|
||||||
|
<IISExpressAnonymousAuthentication />
|
||||||
|
<IISExpressWindowsAuthentication />
|
||||||
|
<IISExpressUseClassicPipelineMode />
|
||||||
|
<UseGlobalApplicationHostFile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Web.DynamicData" />
|
||||||
|
<Reference Include="System.Web.Entity" />
|
||||||
|
<Reference Include="System.Web.ApplicationServices" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.EnterpriseServices" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.ServiceModel.Web" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
|
<Reference Include="System.Web.Extensions" />
|
||||||
|
<Reference Include="System.Web.Services" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Service.svc" />
|
||||||
|
<Content Include="Web.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Service.svc.cs">
|
||||||
|
<DependentUpon>Service.svc</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IService.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="App_Data\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Web.Debug.config">
|
||||||
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
<None Include="Web.Release.config">
|
||||||
|
<DependentUpon>Web.config</DependentUpon>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\bsmd.database\bsmd.database.csproj">
|
||||||
|
<Project>{19945af2-379b-46a5-b27a-303b5ec1d557}</Project>
|
||||||
|
<Name>bsmd.database</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||||
|
<ProjectExtensions>
|
||||||
|
<VisualStudio>
|
||||||
|
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||||
|
<WebProjectProperties>
|
||||||
|
<UseIIS>True</UseIIS>
|
||||||
|
<AutoAssignPort>True</AutoAssignPort>
|
||||||
|
<DevelopmentServerPort>2251</DevelopmentServerPort>
|
||||||
|
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||||
|
<IISUrl>http://localhost:2251/</IISUrl>
|
||||||
|
<NTLMAuthentication>False</NTLMAuthentication>
|
||||||
|
<UseCustomServer>False</UseCustomServer>
|
||||||
|
<CustomServerUrl>
|
||||||
|
</CustomServerUrl>
|
||||||
|
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||||
|
</WebProjectProperties>
|
||||||
|
</FlavorProperties>
|
||||||
|
</VisualStudio>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
Loading…
Reference in New Issue
Block a user