|
-
Mar 3rd, 2015, 01:31 PM
#1
Thread Starter
Sleep mode
REST WCF , how to consume it and return object types
hi
I have my service contract below and implementation in other calls . Anyways , in the browser it's working find but when I try it in Windows Application it errors out . How can i use XML deserializer to get result out of both methods .
Code:
[ServiceContract]
public interface ISer
{
[OperationContract(Name = "SayHi")]
[WebInvoke(Method = "GET", UriTemplate = "SayHi/{Name}")]
string SayHi(string Name);
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped,UriTemplate="/getEmployee")]
Employee getEmployee();
}
[DataContract]
public class Employee
{
[DataMember]
public int EmployeeId { get; set; }
[DataMember]
public string Name { get; set; }
}
Last edited by Pirate; Mar 3rd, 2015 at 01:34 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|