Response with 2 int
Hi,
I am new to WCF. How can I make my response to have 2 integers?
For exmaple:
Operation: GetBookInfo
Request : BookId
Response : ISBN and Quantity
Newbie
Hi,
I am new to WCF. How can I make my response to have 2 integers?
For exmaple:
Operation: GetBookInfo
Request : BookId
Response : ISBN and Quantity
Newbie
You can return a custom type, like a struct or a class object. It would have to be defined in both locations (you could build it to a seperate dll and reference that.)
-James
[DataContract] public class BookStats { [DataMember] public int Quantity; [DataMember] public string ISBN; } [ServiceContract] public interface BookService { [OperationContract] BookStats GetBookInfo(string BookId); } Code Snippet
... or go for a more message-like approach...