Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add sample console client implementation

  • Loading branch information...
commit c7fe77e98b9071007859a277223074855c0dc3f3 1 parent 12d9208
@milang milang authored
View
6 SampleWcf.sln
@@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleWcf.Web", "Source\SampleWcf.Web\SampleWcf.Web.csproj", "{916289AE-064F-482E-A9C5-92DD5D92CDA6}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleWcf.TestClient", "Source\SampleWcf.TestClient\SampleWcf.TestClient.csproj", "{46E8A1FA-A258-43A3-985D-F16143F7BB86}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -13,6 +15,10 @@ Global
{916289AE-064F-482E-A9C5-92DD5D92CDA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{916289AE-064F-482E-A9C5-92DD5D92CDA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{916289AE-064F-482E-A9C5-92DD5D92CDA6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {46E8A1FA-A258-43A3-985D-F16143F7BB86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {46E8A1FA-A258-43A3-985D-F16143F7BB86}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {46E8A1FA-A258-43A3-985D-F16143F7BB86}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {46E8A1FA-A258-43A3-985D-F16143F7BB86}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
41 Source/SampleWcf.TestClient/Program.cs
@@ -0,0 +1,41 @@
+using System;
+using System.ServiceModel.Web;
+
+using SampleWcf.TestClient.SampleWcfCall;
+
+namespace SampleWcf.TestClient
+{
+
+ /// <summary>
+ /// </summary>
+ public static class Program
+ {
+
+ /// <summary>
+ /// </summary>
+ public static void Main(string[] args)
+ {
+ try
+ {
+ Console.WriteLine("Start sending");
+ using (var f = new WebChannelFactory<IFileTracker>(new Uri("http://mgardian/samplewcf/Call.svc/FileTracker")))
+ {
+ var c = f.CreateChannel();
+ c.Track(new[]
+ {
+ "First.txt",
+ "Second.txt"
+ });
+ }
+ Console.WriteLine("Done sending");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ Console.WriteLine(ex.StackTrace);
+ }
+ }
+
+ }
+
+}
View
36 Source/SampleWcf.TestClient/Properties/AssemblyInfo.cs
@@ -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("SampleWcf.TestClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("SampleWcf.TestClient")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[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("9b6cdf19-e31d-4187-b6ff-9f3cb56d559a")]
+
+// 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 Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
86 Source/SampleWcf.TestClient/SampleWcf.TestClient.csproj
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{46E8A1FA-A258-43A3-985D-F16143F7BB86}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>SampleWcf.TestClient</RootNamespace>
+ <AssemblyName>TestClient</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</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\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Runtime.Serialization" />
+ <Reference Include="System.ServiceModel" />
+ <Reference Include="System.ServiceModel.Web" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Service References\SampleWcfCall\Reference.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Reference.svcmap</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadata Include="Service References\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\SampleWcfCall\Call.wsdl" />
+ <None Include="Service References\SampleWcfCall\Call.xsd">
+ <SubType>Designer</SubType>
+ </None>
+ <None Include="Service References\SampleWcfCall\Call1.xsd">
+ <SubType>Designer</SubType>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadataStorage Include="Service References\SampleWcfCall\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\SampleWcfCall\Call.disco" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\SampleWcfCall\Call2.xsd">
+ <SubType>Designer</SubType>
+ </None>
+ <None Include="Service References\SampleWcfCall\configuration91.svcinfo" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\SampleWcfCall\configuration.svcinfo" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Service References\SampleWcfCall\Reference.svcmap">
+ <Generator>WCF Proxy Generator</Generator>
+ <LastGenOutput>Reference.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
View
4 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Call.disco
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
+ <contractRef ref="http://localhost/samplewcf/Call.svc?wsdl" docRef="http://localhost/samplewcf/Call.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
+</discovery>
View
23 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Call.wsdl
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Call" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://tempuri.org/Imports">
+ <xsd:import schemaLocation="http://localhost/samplewcf/Call.svc?xsd=xsd0" namespace="http://tempuri.org/" />
+ <xsd:import schemaLocation="http://localhost/samplewcf/Call.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
+ <xsd:import schemaLocation="http://localhost/samplewcf/Call.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="IFileTracker_Track_InputMessage">
+ <wsdl:part name="parameters" element="tns:Track" />
+ </wsdl:message>
+ <wsdl:message name="IFileTracker_Track_OutputMessage">
+ <wsdl:part name="parameters" element="tns:TrackResponse" />
+ </wsdl:message>
+ <wsdl:portType name="IFileTracker">
+ <wsdl:operation name="Track">
+ <wsdl:input wsaw:Action="http://tempuri.org/IFileTracker/Track" message="tns:IFileTracker_Track_InputMessage" />
+ <wsdl:output wsaw:Action="http://tempuri.org/IFileTracker/TrackResponse" message="tns:IFileTracker_Track_OutputMessage" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:service name="Call" />
+</wsdl:definitions>
View
42 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Call.xsd
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:element name="anyType" nillable="true" type="xs:anyType" />
+ <xs:element name="anyURI" nillable="true" type="xs:anyURI" />
+ <xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
+ <xs:element name="boolean" nillable="true" type="xs:boolean" />
+ <xs:element name="byte" nillable="true" type="xs:byte" />
+ <xs:element name="dateTime" nillable="true" type="xs:dateTime" />
+ <xs:element name="decimal" nillable="true" type="xs:decimal" />
+ <xs:element name="double" nillable="true" type="xs:double" />
+ <xs:element name="float" nillable="true" type="xs:float" />
+ <xs:element name="int" nillable="true" type="xs:int" />
+ <xs:element name="long" nillable="true" type="xs:long" />
+ <xs:element name="QName" nillable="true" type="xs:QName" />
+ <xs:element name="short" nillable="true" type="xs:short" />
+ <xs:element name="string" nillable="true" type="xs:string" />
+ <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
+ <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
+ <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
+ <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
+ <xs:element name="char" nillable="true" type="tns:char" />
+ <xs:simpleType name="char">
+ <xs:restriction base="xs:int" />
+ </xs:simpleType>
+ <xs:element name="duration" nillable="true" type="tns:duration" />
+ <xs:simpleType name="duration">
+ <xs:restriction base="xs:duration">
+ <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
+ <xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
+ <xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:element name="guid" nillable="true" type="tns:guid" />
+ <xs:simpleType name="guid">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:attribute name="FactoryType" type="xs:QName" />
+ <xs:attribute name="Id" type="xs:ID" />
+ <xs:attribute name="Ref" type="xs:IDREF" />
+</xs:schema>
View
16 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Call1.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import schemaLocation="http://localhost/samplewcf/Call.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
+ <xs:element name="Track">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="files" nillable="true" type="q1:ArrayOfstring" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrackResponse">
+ <xs:complexType>
+ <xs:sequence />
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
View
9 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Call2.xsd
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:complexType name="ArrayOfstring">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring" />
+</xs:schema>
View
53 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Reference.cs
@@ -0,0 +1,53 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.237
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SampleWcf.TestClient.SampleWcfCall {
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ [System.ServiceModel.ServiceContractAttribute(ConfigurationName="SampleWcfCall.IFileTracker")]
+ public interface IFileTracker {
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IFileTracker/Track", ReplyAction="http://tempuri.org/IFileTracker/TrackResponse")]
+ void Track(string[] files);
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public interface IFileTrackerChannel : SampleWcf.TestClient.SampleWcfCall.IFileTracker, System.ServiceModel.IClientChannel {
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class FileTrackerClient : System.ServiceModel.ClientBase<SampleWcf.TestClient.SampleWcfCall.IFileTracker>, SampleWcf.TestClient.SampleWcfCall.IFileTracker {
+
+ public FileTrackerClient() {
+ }
+
+ public FileTrackerClient(string endpointConfigurationName) :
+ base(endpointConfigurationName) {
+ }
+
+ public FileTrackerClient(string endpointConfigurationName, string remoteAddress) :
+ base(endpointConfigurationName, remoteAddress) {
+ }
+
+ public FileTrackerClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(endpointConfigurationName, remoteAddress) {
+ }
+
+ public FileTrackerClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(binding, remoteAddress) {
+ }
+
+ public void Track(string[] files) {
+ base.Channel.Track(files);
+ }
+ }
+}
View
34 Source/SampleWcf.TestClient/Service References/SampleWcfCall/Reference.svcmap
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="0eb49d24-d9d6-4840-84eb-67644960dd5b" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
+ <ClientOptions>
+ <GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
+ <EnableDataBinding>true</EnableDataBinding>
+ <ExcludedTypes />
+ <ImportXmlTypes>false</ImportXmlTypes>
+ <GenerateInternalTypes>false</GenerateInternalTypes>
+ <GenerateMessageContracts>false</GenerateMessageContracts>
+ <NamespaceMappings />
+ <CollectionMappings />
+ <GenerateSerializableTypes>true</GenerateSerializableTypes>
+ <Serializer>Auto</Serializer>
+ <UseSerializerForFaults>true</UseSerializerForFaults>
+ <ReferenceAllAssemblies>true</ReferenceAllAssemblies>
+ <ReferencedAssemblies />
+ <ReferencedDataContractTypes />
+ <ServiceContractMappings />
+ </ClientOptions>
+ <MetadataSources>
+ <MetadataSource Address="http://localhost/SampleWcf/Call.svc" Protocol="http" SourceId="1" />
+ </MetadataSources>
+ <Metadata>
+ <MetadataFile FileName="Call.disco" MetadataType="Disco" ID="54fc97b2-aa04-4631-a7f1-4cfc7217d9e5" SourceId="1" SourceUrl="http://localhost/samplewcf/Call.svc?disco" />
+ <MetadataFile FileName="Call.wsdl" MetadataType="Wsdl" ID="178e1b0f-2c6a-4116-ade9-2516f343ab27" SourceId="1" SourceUrl="http://localhost/samplewcf/Call.svc?wsdl" />
+ <MetadataFile FileName="Call.xsd" MetadataType="Schema" ID="96412c43-5f2e-420d-861a-3942e99d8443" SourceId="1" SourceUrl="http://localhost/samplewcf/Call.svc?xsd=xsd1" />
+ <MetadataFile FileName="Call1.xsd" MetadataType="Schema" ID="f0d86052-655f-4ded-9971-e6a42d7a4653" SourceId="1" SourceUrl="http://localhost/samplewcf/Call.svc?xsd=xsd0" />
+ <MetadataFile FileName="Call2.xsd" MetadataType="Schema" ID="b7df3a38-1d1d-4a3b-9c12-26d4ef57c0a4" SourceId="1" SourceUrl="http://localhost/samplewcf/Call.svc?xsd=xsd2" />
+ </Metadata>
+ <Extensions>
+ <ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
+ <ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
+ </Extensions>
+</ReferenceGroup>
View
6 Source/SampleWcf.TestClient/Service References/SampleWcfCall/configuration.svcinfo
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
+ <behaviors />
+ <bindings />
+ <endpoints />
+</configurationSnapshot>
View
5 Source/SampleWcf.TestClient/Service References/SampleWcfCall/configuration91.svcinfo
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="7NHIOSeEs9eU7Yz2+nw6b8v94PU=">
+ <bindingConfigurations />
+ <endpoints />
+</SavedWcfConfigurationInformation>
View
3  Source/SampleWcf.Web/FileTracker.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.ServiceModel;
+using System.ServiceModel.Web;
namespace SampleWcf.Web
{
@@ -8,7 +9,7 @@ namespace SampleWcf.Web
public interface IFileTracker
{
- [OperationContract]
+ [OperationContract, WebInvoke(Method = "POST")]
void Track(IEnumerable<string> files);
}
View
23 Source/SampleWcf.Web/SampleWcf.Web.csproj
@@ -3,8 +3,6 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>
- </ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{916289AE-064F-482E-A9C5-92DD5D92CDA6}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
@@ -13,7 +11,6 @@
<RootNamespace>SampleWcf.Web</RootNamespace>
<AssemblyName>SampleWcf.Web</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -40,6 +37,7 @@
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
+ <Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
@@ -75,26 +73,9 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
- <UseIIS>False</UseIIS>
- <AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>55236</DevelopmentServerPort>
- <DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>
- </IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- <UseCustomServer>False</UseCustomServer>
- <CustomServerUrl>
- </CustomServerUrl>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ <SaveServerSettingsInUserFile>True</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>
View
2  Source/SampleWcf.Web/Web.config
@@ -52,7 +52,7 @@
</serviceBehaviors>
<endpointBehaviors>
<behavior name="SampleWcfEndpointWebBehavior">
- <webHttp defaultOutgoingResponseFormat="Json" automaticFormatSelectionEnabled="True" defaultBodyStyle="WrappedRequest" helpEnabled="False" />
+ <webHttp defaultOutgoingResponseFormat="Json" automaticFormatSelectionEnabled="True" defaultBodyStyle="Bare" helpEnabled="False" />
</behavior>
</endpointBehaviors>
</behaviors>
Please sign in to comment.
Something went wrong with that request. Please try again.