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

[853 byte] By [csharpnewbie] at [2008-1-8]
# 1

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

JamesOsborne-MSFT at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2

Code Snippet

[DataContract]

public class BookStats

{

[DataMember]

public int Quantity;

[DataMember]

public string ISBN;

}

[ServiceContract]

public interface BookService

{

[OperationContract]

BookStats GetBookInfo(string BookId);

}

... or go for a more message-like approach...

ChristianWeyer at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified