Vb.net 如何读取SOAP响应?

Vb.net 如何读取SOAP响应?,vb.net,soap,Vb.net,Soap,如何读取SOAP响应?在函数下方,仅读取某些特定节点。 我想阅读整个SOAP响应 <System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="urn:OpenEdgeServices:TEST:TEST", ResponseNamespace:="urn:OpenEdgeServices:TEST:TEST", Use:=System.Web.Services.Description.S

如何读取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
_
公共函数webdirect(ByVal Company作为System.Nullable(属于整数),ByVal LocationCode作为String,ByVal CustomerNumber作为String,ByVal OrderNumber作为String,ByVal OrderRef作为String,ByVal OrderDate作为System.Nullable(属于日期),ByVal WebLines()作为webdirect_WebLinesRow,ByRef o_Company作为System.Nullable(属于整数),ByRef o_LocationCode为字符串,ByRef o_CustomerNumber为字符串,ByRef o_OrderNumber为字符串,ByRef o_OrderStatus为字符串,ByRef o_OrdDescription为字符串,ByRef RespLines()为webdirect_RespLinesRow)为字符串
Dim results()作为Object=Me.Invoke(“webdirect”,新对象(){Company,LocationCode,CustomerNumber,OrderNumber,OrderRef,OrderDate,WebLines})
o_Company=CType(结果(1),System.Nullable(整型))
o_LocationCode=CType(结果(2),字符串)
o_CustomerNumber=CType(结果(3),字符串)
o_OrderNumber=CType(结果(4),字符串)
o_OrderStatus=CType(结果(5),字符串)
o_orddescripp=CType(结果(6),字符串)
RespLines=CType(结果(7),webdirect_RespLinesRow()
返回CType(结果(0),字符串)
端函数

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