I had deploy a program to call Java Web services from VB.net . Below is my code:
after run the code, I had get soap error code 500 after soap.send(), is that anything wrong with my program ??
Code:
Dim myGetCustInfoNewService As GetCustInfoNewService.SA1Z1003 = New GetCustInfoNewService.SA1Z1003()
Dim a As Integer = myCalculatorService.Add(6, 2)
'---------------------Define Input Parameter----------------------------
strTransNo = Date.Today.Year.ToString.PadLeft(4, CChar("0")) & _
Date.Now.Month.ToString.PadLeft(2, CChar("0")) & _
Date.Now.Day.ToString.PadLeft(2, CChar("0")) & _
Date.Now.Hour.ToString.PadLeft(2, CChar("0")) & _
Date.Now.Minute.ToString.PadLeft(2, CChar("0")) & _
Date.Now.Second.ToString.PadLeft(5, CChar("0")) & _
Date.Now.Millisecond.ToString.PadLeft(6, CChar("0"))
Dim myInstanceGetCustInfoNewServiceRequest As GetCustInfoNewService.SA1Z1004 = New GetCustInfoNewService.SA1Z1004()
myInstanceGetCustInfoNewServiceRequest.TransNo = strTransNo
myInstanceGetCustInfoNewServiceRequest.TypOpt = strTypOpt
myInstanceGetCustInfoNewServiceRequest.OptInp = strOptInp
'Dim strAbc As String()
'strAbc = myGetCustInfoNewService.SA1Z1004(myInstanceGetCustInfoNewServiceRequest)
Dim myKey
myKey = " <SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/""" & _
" xmlns:SOAP-ENC=""http://schemas.xmlsoap.org/soap/encoding/""" & _
" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""" & _
" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""> " & _
" <SOAP-ENV:Body> " & _
" <SA1Z1003 xmlns=""http://TestWeb/cics/esp1/dfhwsdsh/espick""> " & _
" <SA1Z1003>" & _
"<TransNo>" & strTransNo & "</TransNo> " & _
"<TypOpt>" & strTypOpt & "</TypOpt> " & _
"<OptInp>" & strPVaccNo & "</OptInp> " & _
" <SA1Z1003>" & _
"</SA1Z1003> " & _
"</SOAP-ENV:Body> " & _
"</SOAP-ENV:Envelope> "
Dim soap As Object
soap = Server.CreateObject("MSXML2.ServerXMLHTTP")
soap.open("post", "http://TestWeb/cics/esp1/dfhwsdsh/esp", False)
soap.setRequestHeader("Content-Type", "text/xml")
soap.setRequestHeader("soapAction", "http://TestWeb/cics/esp1/dfhwsdsh/esp/SA1Z1004")
soap.send(myKey)
If soap.status = 200 Then
Dim Res1 As Object
Res1 = Server.CreateObject("MSXML2.DOMDocument")
Res1.loadXML(soap.responseText)
Res1.save("c:\sucess.xml")
Else
Dim Res2 As Object
Res2 = Server.CreateObject("MSXML2.DOMDocument")
Res2.loadXML(soap.responseText)
Res2.save("c:\error.xml")
End If
after run the code, I had get soap error code 500 after soap.send(), is that anything wrong with my program ??
Comment