如何阅读SOAP响应?在功能下方,仅读取某些特定节点。
我想阅读整个SOAP响应。

<System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="urn:OpenEdgeServices:TEST:TEST", ResponseNamespace:="urn:OpenEdgeServices:TEST:TEST", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
        Public Function webdirect(<System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByVal Company As System.Nullable(Of Integer), <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByVal LocationCode As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByVal CustomerNumber As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByVal OrderNumber As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByVal OrderRef As String, <System.Xml.Serialization.XmlElementAttribute(DataType:="date", IsNullable:=True)> ByVal OrderDate As System.Nullable(Of Date), <System.Xml.Serialization.XmlArrayAttribute(IsNullable:=True), System.Xml.Serialization.XmlArrayItemAttribute("WebLinesRow", IsNullable:=False)> ByVal WebLines() As webdirect_WebLinesRow, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByRef o_Company As System.Nullable(Of Integer), <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByRef o_LocationCode As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByRef o_CustomerNumber As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByRef o_OrderNumber As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByRef o_OrderStatus As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> ByRef o_OrdDescrip As String, <System.Xml.Serialization.XmlArrayAttribute(IsNullable:=True), System.Xml.Serialization.XmlArrayItemAttribute("RespLinesRow", IsNullable:=False)> ByRef RespLines() As webdirect_RespLinesRow) As <System.Xml.Serialization.XmlElementAttribute("result", IsNullable:=True)> String
            Dim results() As Object = Me.Invoke("webdirect", New Object() {Company, LocationCode, CustomerNumber, OrderNumber, OrderRef, OrderDate, WebLines})
            o_Company = CType(results(1), System.Nullable(Of Integer))
            o_LocationCode = CType(results(2), String)
            o_CustomerNumber = CType(results(3), String)
            o_OrderNumber = CType(results(4), String)
            o_OrderStatus = CType(results(5), String)
            o_OrdDescrip = CType(results(6), String)
            RespLines = CType(results(7), webdirect_RespLinesRow())
            Return CType(results(0), String)
        End Function

最佳答案

SOAP响应只是XML代码。就像普通的XML一样解析它。

关于vb.net - 如何读取SOAP响应?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7318760/

10-11 10:58