Error log: UploadCheck - WEB address There was an error while trying to deserialize the parameter XX: UploadResult. Both Please see InnerException for more details.
//the server returns the Class
[WCF: : MessageContract (WrapperName="UploadDataResponse WrapperNamespace=" XX ")]
Public partial class UploadDataResponse
{
Private Wistron. LMS. BusinessEntities. GenericDataSet uploadResult;
Private Wistron. LMS. BusinessEntities. The Criteria the Criteria;
[WCF: : MessageBodyMember (Namespace="XX" and Name="UploadResult")]
Public Wistron. LMS. BusinessEntities. GenericDataSet UploadResult
{
The get {return uploadResult; }
The set {uploadResult=value; }
}
[WCF: : MessageBodyMember (Namespace="XX" and Name="Criteria")]
Public Wistron. LMS. BusinessEntities. The Criteria the Criteria
{
The get {return criteria; }
The set {criteria=value; }
}
}
//web receiving returns the Class
[System Diagnostics. DebuggerStepThroughAttribute ()]
[System.CodeDom.Com piler GeneratedCodeAttribute (" System. ServiceModel ", "4.0.0.0")]
[System. ServiceModel. MessageContractAttribute (WrapperName="UploadDataResponse WrapperNamespace=" XX ", IsWrapped=true)]
Public partial class UploadDataResponse {
[System. ServiceModel. MessageBodyMemberAttribute (Namespace="XX", the Order=0)]
The public System. Collections. Generic. DictionaryThe Criteria;
[System. ServiceModel. MessageBodyMemberAttribute (Namespace="XX", the Order=1)]
Public Wistron. LMS. BusinessEntities. GenericDataSet UploadResult;
Public UploadDataResponse () {
}
Public UploadDataResponse (System. Collections. Generic. DictionaryThe Criteria and Wistron. LMS. BusinessEntities. GenericDataSet UploadResult) {
Enclosing the Criteria=Criteria;
Enclosing UploadResult=UploadResult;
}
}
//server side methods
Public override UploadDataResponse UploadData (UploadDataRequest request)
{
The Criteria resultCriteria=null;
UploadDataResponse response=new UploadDataResponse ();
Try
{
Response. UploadResult=DispatcherLogic. UploadDataDispatcher ((UploadDataType) request. UploadDataType, request the Criteria, request. UploadData, out resultCriteria);
The response. The Criteria=resultCriteria;
}
The catch (Exception ex)
{
LogHelper. WriteLogs (DateTime. Now. The ToString () + "UploadDataDispatcher:" + ex. Message);
}
return response;
}
//web server-side method
Public GenericDataSet UploadCheck (string plant, the Criteria the Criteria, GenericDataSet genericDataTable)
{
PPServiceReference. PPServiceClient client=null;
Try
{
The client=ServiceClientManager. Take (plant);
PPServiceReference. UploadDataRequest request=new PPServiceReference. UploadDataRequest () {UploadData=https://bbs.csdn.net/topics/genericDataTable, UploadDataType=(int) UploadDataType. UploadCZCombineDN, Criteria=Criteria};
PPServiceReference. UploadDataResponse response=client. UploadData (request);
Return the response. UploadResult;
}
The catch (Exception ex)
{
LogHelper. WriteLogs (" UploadCheck - WEB "+ ex. Message);
return null;
}
The finally
{
If (client!=null) ServiceClientManagerReturn (ref client);
}
}
CodePudding user response:
Well, this thing, you make sure you received what,Docking involves many things, you have to make sure no problem, in keep yourself no problem, if there is a change to the other party and you need to update the reference service, regenerated agent
CodePudding user response: