I have an Operation Contract in my WCF service which returns an instance of the class which is actually a Message Contract. (Not Data Contract). The Message Contract has properties with attribute > [MessageBodyMember]
[MessageContract(WrapperName="AuthorizarionResponse", IsWrapped="true")]
public class AuthorizationResponse
{
[MessageBodyMember] public string role {get;set;};
[MessageBodyMember] public Organization organization {get; set;};
}
[ServiceContract]
interface IAuthorization
{
[OperationContract]
public AuthoriztionResponse GetAuthorizationResult(AuthorizationRequestMessage request);
}
Organization
class uses the XmlSerializer. It does not use DataContract because I want WCF service to be used from existing ASMX clients.
When I debug the service and see the return value in the Operation Contract method, i can see everything which i want to return from the service through this operation contract.
But at the client side, I get null value!
Everything is ending without any exception/error. Fiddler2 does not give any red/error marks! What would be going wrong?