开发者

WCF service returns Error:System.Xml.Schema.XmlSchemaValidationException:

My application is accessing a WCF service hosted at the server. When i try to call a Method with [WebInvoke] attribute the response returned is always "error". All other methods with [WebGet] attribute are working fine.

The interface as in the reference.cs is

 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
 [System.ServiceModel.ServiceContractAttribute(ConfigurationName="SyncService.IService")]
 public interface IService
 {


 [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest)]  
 [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="")]
 [System.ServiceModel.FaultContractAttribute(typeof(DataSynchronization.SyncService.WebExceptionDetail), Action="Update", Name="WebExceptionDetail", Namespace="http://schemas.datacontract.org/xxx.WebServices")]
 string Update(string mode, string data);

  }

whenever i try to call the Update method of the service using the code

string response = objClient.Update("manual", string data);

the response obtained is "Error".and the log displays

Error - "System.Xml.Schema.XmlSchemaValidationException: The element 开发者_运维知识库'providers' cannot contain text. List of possible elements expected: 'provider'". on calling Update

The service is hosted in a remote server which i cannot debug either.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜