Wednesday, March 08, 2006 11:42 PM
I have a service method which returns xml document to client. If I have this method, then service is returning error:
"The service encountered an error while generating metadata. See the trace files for more details."
My code is:
[ServiceContract] public interface IMyService
[DataContract] public class MyXmlData
Is there any thing wrong in the above code?
Thanks in Advance,
Thursday, March 09, 2006 7:07 PM
You will need to add the [XmlSerializerFormat] attribute.
So (without using Datacontract although you can use that too):
[ServiceContract(Namespace = "urn:SerializationTest")]
[XmlSerializerFormat] public interface IBlah
[OperationContract] XmlDocument Returnxmldoc();
Friday, March 21, 2008 8:57 PM