无法连接到SOAP服务

时间:2018-12-21 22:08:40

标签: c# soap .net-core

我正在尝试使用.NET Core 2.1连接到第三方的SOAP服务。当我调用它们的任何方法时,都会引发以下异常。

我对使用SOAP服务还很陌生,因此这里的任何建议都值得赞赏。

System.AggregateException
  HResult=0x80131500
  Message=One or more errors occurred.
  Source=System.Private.CoreLib
  StackTrace:
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at ConsoleApp6.Program.Main(String[] args) in c:\users\joshua\source\repos\ConsoleApp6\ConsoleApp6\Program.cs:line 15

Inner Exception 1:
InvalidOperationException: There was an error reflecting 'data'.

Inner Exception 2:
InvalidOperationException: The top XML element 'data' from namespace '' references distinct types ServiceReference2.WSIssueNewPayrollCardData and ServiceReference2.WSIssueNewPersonalizedPayrollCardData. Use XML attributes to specify another XML name or namespace for the element or types.

0 个答案:

没有答案