messagecontract

WCF DataContractSerializer doesn't pick up contract attributes… why not?

我怕爱的太早我们不能终老 提交于 2019-12-03 20:00:20
I have the following type which I use as a message contract in WCF: [MessageContract(IsWrapped = true, WrapperNamespace = "http://example.com/services", WrapperName = "EchoRequest")] public class EchoRequest { public EchoRequest() { } public EchoRequest(String value) { Value = value; } [MessageBodyMember(Name = "Value", Namespace = "http://example.com/services", Order = 0)] public String Value { get; set; } } When I generate a proxy to this type using svcutil.exe , I get a client which is able to communicate to a service which hosts it, with the XML namespaces on the elements correct according

WCF: Data contract being converted to message contract

♀尐吖头ヾ 提交于 2019-11-30 16:24:00
My WCF service exports a single operation, marked with the catch-all action and reply action so that it represents a common entry point to the service: [ServiceContract] public interface IService { [OperationContract (Action="*", ReplyAction="*")] Message MyMethod (Message msg); } Client proxies are still generated as data contracts. What I'm finding, however, is that despite the client sending a data contract, when msg is serialized, the body appears to be the equivalent message contract to the data contract, not the data contract itself. Even this is fine, except that extracting the data

Add Service Reference is generating Message Contracts

天涯浪子 提交于 2019-11-30 11:30:05
When I import a given service using "Add service Reference" on Visual Studio 2008 (SP1) all the Request/Response messages are being unnecessarily wrapped into Message Contracts (named as --> "operationName" + "Request"/"Response" + "1" at the end). The code generator says: // CODEGEN: Generating message contract since the operation XXX is neither RPC nor // document wrapped. The guys who are generating the wsdl from a Java service say they are specifying DOCUMENT-LITERAL/WRAPPED . Any help/pointer/clue would be highly appreciated. Update : this is a sample of my wsdl for one of the operations

WCF: Data contract being converted to message contract

Deadly 提交于 2019-11-29 23:30:01
问题 My WCF service exports a single operation, marked with the catch-all action and reply action so that it represents a common entry point to the service: [ServiceContract] public interface IService { [OperationContract (Action="*", ReplyAction="*")] Message MyMethod (Message msg); } Client proxies are still generated as data contracts. What I'm finding, however, is that despite the client sending a data contract, when msg is serialized, the body appears to be the equivalent message contract to

Add Service Reference is generating Message Contracts

核能气质少年 提交于 2019-11-29 17:00:42
问题 When I import a given service using "Add service Reference" on Visual Studio 2008 (SP1) all the Request/Response messages are being unnecessarily wrapped into Message Contracts (named as --> "operationName" + "Request"/"Response" + "1" at the end). The code generator says: // CODEGEN: Generating message contract since the operation XXX is neither RPC nor // document wrapped. The guys who are generating the wsdl from a Java service say they are specifying DOCUMENT-LITERAL/WRAPPED . Any help

WCF MessageContract Inheritance

送分小仙女□ 提交于 2019-11-28 13:42:52
I am fairly new to WCF and just have a question on how to correctly get MessageContract inheritance working. A simplified version of my setup is as follows - a "base" message type, and then another "test" message which inherits from it. [MessageContract] public abstract class BaseMessage { } [MessageContract] public class TestMessage : BaseMessage { } I then have an asynchronous OperationContract on a ServiceContract defined as: [OperationContract(AsyncPattern = true)] IAsyncResult BeginFindRequest(BaseMessage request, AsyncCallback callback, object asyncState); The problem that I am getting