Created
September 1, 2015 10:53
-
-
Save vbilopav/7ad852ca6c6c11d9b1e2 to your computer and use it in GitHub Desktop.
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
[DataContract] | |
public class Response | |
{ | |
[DataMember] | |
public bool Success { get; set; } | |
} | |
[DataContract] | |
public class Request | |
{ | |
[DataMember] | |
public string CorrelationId { get; set; } | |
} | |
[DataContract] | |
public class DoSomeWorkResponse : Response { } | |
[DataContract] | |
public class DoSomeOtherWorkResponse : Response { } | |
[DataContract] | |
public class SomeWorkRequest : Request | |
{ | |
[DataMember] | |
public int Param1 { get; set; } | |
[DataMember] | |
public string Param2 { get; set; } | |
} | |
[DataContract] | |
public class SomeOtherWorkRequest : Request | |
{ | |
[DataMember] | |
public int OtherParam1 { get; set; } | |
} | |
[ServiceContract] | |
public interface IMyServiceSample | |
{ | |
[OperationContract] //soap xml | |
[WebGet(ResponseFormat = WebMessageFormat.Json)] //json | |
DoSomeWorkResponse DoSomeWork(SomeWorkRequest request); | |
[OperationContract] //soap xml | |
[WebGet(ResponseFormat = WebMessageFormat.Json)] //json | |
DoSomeOtherWorkResponse DoSomeOtherWork(SomeOtherWorkRequest request); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment