Sub consumeService(strOpt As String,data1 As String,data2 As String,data3 As String,data4 As String,data5 As String,data6 As String,data7 As String,data8 As String)
Dim PostUrl As String = ""
Dim strXML As String=""
Dim job1 As HttpJob
Select Case strOpt
Case "1" 'Login
PostUrl = "http://xxxx.5.xxx.xxx/coreonCash_dev4/pages/Coreon_GCash.wsdl"
strXML = "<?xml version='1.0' encoding='UTF-8'?>"
strXML = strXML & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' "
strXML = strXML & "xmlns:ns1='uri:coreon.gcash' xmlns:xsd='http://www.w3.org/2001/XMLSchema' "
strXML = strXML & "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' "
strXML = strXML & "SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>"
strXML = strXML & "<SOAP-ENV:Body>"
strXML = strXML & "<ns1:loginRequest>"
strXML = strXML & "<id xsi:type='xsd:String'>" & data1 & "</id>"
strXML = strXML & "<password xsi:type='xsd:String'>" & data2 & "</password>"
strXML = strXML & "</ns1:login>"
strXML = strXML & "</SOAP-ENV:Body>"
strXML = strXML & "</SOAP-ENV:Envelope>"
strXML = strXML.Replace("'", Chr(34))
job1.Initialize("login", Me)
job1.PostString(PostUrl, strXML)
job1.GetRequest.SetContentType("text/xml; charset=utf-8")
End Select
End Sub
Sub JobDone (Job As HttpJob)
If Job.Success Then
Select Job.JobName
Case "login"
Log(Job.GetString)
parser.Initialize()
parser.Parse(Job.GetInputStream , "Parser")
End Select
Else
Msgbox( "Error in Accessing Web Portal," & CRLF & "Make sure you are connected to the Internet!", "Error")
'Msgbox( Job.errormessage , "Error")
End If
Job.Release
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
If parser.Parents.IndexOf("login") > -1 Then 'login
If Name = "session" Then
strSession = Text.ToString
Else If Name = "result" Then
strResult = Text.ToString
End If
End If
End Sub