Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example for WCF usage in configuration
git-svn-id: http://protobuf-net.googlecode.com/svn/trunk@276 b72047a4-3652-0410-9617-b3994939e97b
- Loading branch information
marc.gravell
committed
Nov 11, 2009
1 parent
2f00969
commit d84e28b
Showing
28 changed files
with
1,433 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See blog for notes on this: http://marcgravell.blogspot.com/2009/11/controlling-wcf-protobuf-net-at.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
| ||
using TestWcfClient.ServiceReference1; | ||
using TestWcfDto; | ||
namespace TestWcfClient | ||
{ | ||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
using (var client = new Service1Client()) | ||
{ | ||
string s = client.GetData(123); | ||
var ct = new CompositeType { BoolValue = true, StringValue = s }; | ||
var resp = client.GetDataUsingDataContract(ct); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("TestWcfClient")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("TestWcfClient")] | ||
[assembly: AssemblyCopyright("Copyright © 2009")] | ||
[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("d35cacc5-787e-4e68-925f-2916fa5b89f6")] | ||
|
||
// 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")] |
10 changes: 10 additions & 0 deletions
10
TestWcfClient/Properties/DataSources/TestWcfDto.CompositeType.datasource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is automatically generated by Visual Studio .Net. It is | ||
used to store generic object data source configuration information. | ||
Renaming the file extension or editing the content of this file may | ||
cause the file to be unrecognizable by the program. | ||
--> | ||
<GenericObjectDataSource DisplayName="CompositeType" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | ||
<TypeInfo>TestWcfDto.CompositeType, TestWcfDto, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> | ||
</GenericObjectDataSource> |
60 changes: 60 additions & 0 deletions
60
TestWcfClient/Service References/ServiceReference1/Reference.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:2.0.50727.4927 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
namespace TestWcfClient.ServiceReference1 { | ||
|
||
|
||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] | ||
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference1.IService1")] | ||
public interface IService1 { | ||
|
||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService1/GetData", ReplyAction="http://tempuri.org/IService1/GetDataResponse")] | ||
string GetData(int value); | ||
|
||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService1/GetDataUsingDataContract", ReplyAction="http://tempuri.org/IService1/GetDataUsingDataContractResponse")] | ||
TestWcfDto.CompositeType GetDataUsingDataContract(TestWcfDto.CompositeType composite); | ||
} | ||
|
||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] | ||
public interface IService1Channel : TestWcfClient.ServiceReference1.IService1, System.ServiceModel.IClientChannel { | ||
} | ||
|
||
[System.Diagnostics.DebuggerStepThroughAttribute()] | ||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")] | ||
public partial class Service1Client : System.ServiceModel.ClientBase<TestWcfClient.ServiceReference1.IService1>, TestWcfClient.ServiceReference1.IService1 { | ||
|
||
public Service1Client() { | ||
} | ||
|
||
public Service1Client(string endpointConfigurationName) : | ||
base(endpointConfigurationName) { | ||
} | ||
|
||
public Service1Client(string endpointConfigurationName, string remoteAddress) : | ||
base(endpointConfigurationName, remoteAddress) { | ||
} | ||
|
||
public Service1Client(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : | ||
base(endpointConfigurationName, remoteAddress) { | ||
} | ||
|
||
public Service1Client(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : | ||
base(binding, remoteAddress) { | ||
} | ||
|
||
public string GetData(int value) { | ||
return base.Channel.GetData(value); | ||
} | ||
|
||
public TestWcfDto.CompositeType GetDataUsingDataContract(TestWcfDto.CompositeType composite) { | ||
return base.Channel.GetDataUsingDataContract(composite); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
TestWcfClient/Service References/ServiceReference1/Reference.svcmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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="d245f643-477e-460f-841f-9f499371176f" 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> | ||
<ReferenceAllAssemblies>true</ReferenceAllAssemblies> | ||
<ReferencedAssemblies /> | ||
<ReferencedDataContractTypes /> | ||
<ServiceContractMappings /> | ||
</ClientOptions> | ||
<MetadataSources> | ||
<MetadataSource Address="http://localhost:33545/Service1.svc?wsdl" Protocol="http" SourceId="1" /> | ||
</MetadataSources> | ||
<Metadata> | ||
<MetadataFile FileName="Service1.wsdl" MetadataType="Wsdl" ID="c63ad9f1-e21e-40e7-aa91-932d37d130b7" SourceId="1" SourceUrl="http://localhost:33545/Service1.svc?wsdl" /> | ||
<MetadataFile FileName="Service1.xsd" MetadataType="Schema" ID="04d4a3a5-514b-43bf-919d-f222dcfb5318" SourceId="1" SourceUrl="http://localhost:33545/Service1.svc?xsd=xsd1" /> | ||
<MetadataFile FileName="Service11.xsd" MetadataType="Schema" ID="209faf77-d2ab-42ac-b49d-c9377559b798" SourceId="1" SourceUrl="http://localhost:33545/Service1.svc?xsd=xsd2" /> | ||
<MetadataFile FileName="Service12.xsd" MetadataType="Schema" ID="e7b279e2-a58e-488f-b81e-84c0c3046c8b" SourceId="1" SourceUrl="http://localhost:33545/Service1.svc?xsd=xsd0" /> | ||
</Metadata> | ||
<Extensions> | ||
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" /> | ||
<ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" /> | ||
</Extensions> | ||
</ReferenceGroup> |
Oops, something went wrong.