0
每当我在构建对Powershell中的SOAP webservice端点的复杂webservice调用时发生任何错误时,我都会收到隐含的“SoapServerException”通用消息&。从Powershell调用时,如何从SoapServerException中检索详细信息?
例子:
Exception calling "GetListItems" with "7" argument(s): "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."
At line:1 char:1
+ $spws.GetListItems($listName, $viewName, $xmlQueryStringNodeConverted ...
我知道有更多的细节,这个错误,但在PowerShell中,我不能查看它们。我怎样才能得到他们?
'$ Error [0] | fl -Force','$ Error [0] .Exception | fl -Force'和'$ Error [0] .Exception.InnerException | fl -Force'在发生异常之后? – PetSerAl
哈。这是,谢谢。不是我所期望的--PowerShell将额外的XML响应字段作为额外的属性添加到内部异常中。即$ Error [2] .Exception.InnerException.Detail.errorstring包含下面写的字符串。将更新答案 – Coruscate5