The following is an interface definition.
[OperationContract]
[WebGet(UriTemplate = "FacebookData/?accessToken={accessToken}")]
OperationResult<FacebookData> GetFacebookData(string accessToken);
Return type OperationResult<FacebookData>, this is a general type
Then I will get xml as below ...
OperationResultOfFacebookDataNcCATIYq xmlns: i = "http://www.w3.org/2001/XMLSchema-instance"
How to remove namespace and rename xml element as "OperationResult"
By the way, I already set the namespace empty
[DataContract(Namespace = "")]
public class OperationResult<T>
but I think that a generic type will generate a class for each T.
source
share