从SAP调用Web服务到asp.net(vb)时出现nullreferenceException错误

时间:2018-10-09 06:50:30

标签: asp.net sap nullreferenceexception

Private Sub Button1_Click(发送者为对象,e作为EventArgs)处理Button1.Click

    Dim get_data As New ws1.SI_OS_myservice
    Dim req As ws1.DT_myservice_SenderRow() = New ws1.DT_myservice_SenderRow(0) {}
    Dim get_dataout As ws1.DT_myservice_ReceiverRecord() = New ws1.DT_myservice_ReceiverRecord(0) {}

    Dim USR As String = "USER" 
    Dim PWD As String = "pass@123" 


    get_data.Credentials = New System.Net.NetworkCredential(USR, PWD)
    get_data.PreAuthenticate = True
    get_data.Credentials = cred
    req(0).UNAME = TextBox1.Text // NullReferenceException was unhandled by user code

    get_dataout = get_data.SI_OS_myservice(req)

End Sub

0 个答案:

没有答案