N
Nagul
Hi All,
I am facing a problem calling a web service without generating
proxy class. I am using vb.net (windows application) with soap toolkit
3.0.
The below code works fine when i call a simple web service which
add 2 numbers. But when i try to call a login method of my actual web
service, it doesn't want to work at all. One of the xml tag contains a
encrypted password and i think that is one of the reason for the code
not to work.
Sample Code:
msg = "<?xml version=""1.0"" encoding=""utf-8""?>"
msg = msg & "<soap:Envelope
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance/""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema/""
xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/"">"
msg = msg & "<soap:Body>"
msg = msg & "<LoginWeb
xmlns=""http://www.TrustAccommodation.com/TAAccommodationWebService/"">
"
msg = msg & "<strErrMessage></strErrMessage>"
msg = msg & "<strLoginID>userone</strLoginID>"
msg = msg & "<strPwd>"
msg = msg & Encrypt("demodobookings12")
msg = msg & "</strPwd>"
msg = msg & "</LoginWeb >"
msg = msg & "</soap:Body>"
msg = msg & "</soap:Envelope>"
http.open("POST", serviceURL, False)
http.setRequestHeader("SOAPAction",
"""http://www.TrustAccommodation.com/TAAccommodationWebService/LoginWeb""")
http.setRequestHeader("Content-Type", "text/xml")
http.send(msg)
Msgbox(http.responseText)
I am using the below method which is fairly a simple encryption
Public Function Encrypt(ByVal strText As String) As String
'Local variable declarations
Dim strOutput As String 'Store the
Encrypted string to be returned
Dim intLoop As Integer 'Counter
for strText length
'Encrypt each char of strText
For intLoop = 1 To Len(strText)
strOutput = strOutput & Chr(255 Xor Asc(Mid$(strText,
intLoop, 1)))
Next
Return strOutput.ToString
End Function
Can anyone help me regarding this ?????
Thanks
I am facing a problem calling a web service without generating
proxy class. I am using vb.net (windows application) with soap toolkit
3.0.
The below code works fine when i call a simple web service which
add 2 numbers. But when i try to call a login method of my actual web
service, it doesn't want to work at all. One of the xml tag contains a
encrypted password and i think that is one of the reason for the code
not to work.
Sample Code:
msg = "<?xml version=""1.0"" encoding=""utf-8""?>"
msg = msg & "<soap:Envelope
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance/""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema/""
xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/"">"
msg = msg & "<soap:Body>"
msg = msg & "<LoginWeb
xmlns=""http://www.TrustAccommodation.com/TAAccommodationWebService/"">
"
msg = msg & "<strErrMessage></strErrMessage>"
msg = msg & "<strLoginID>userone</strLoginID>"
msg = msg & "<strPwd>"
msg = msg & Encrypt("demodobookings12")
msg = msg & "</strPwd>"
msg = msg & "</LoginWeb >"
msg = msg & "</soap:Body>"
msg = msg & "</soap:Envelope>"
http.open("POST", serviceURL, False)
http.setRequestHeader("SOAPAction",
"""http://www.TrustAccommodation.com/TAAccommodationWebService/LoginWeb""")
http.setRequestHeader("Content-Type", "text/xml")
http.send(msg)
Msgbox(http.responseText)
I am using the below method which is fairly a simple encryption
Public Function Encrypt(ByVal strText As String) As String
'Local variable declarations
Dim strOutput As String 'Store the
Encrypted string to be returned
Dim intLoop As Integer 'Counter
for strText length
'Encrypt each char of strText
For intLoop = 1 To Len(strText)
strOutput = strOutput & Chr(255 Xor Asc(Mid$(strText,
intLoop, 1)))
Next
Return strOutput.ToString
End Function
Can anyone help me regarding this ?????
Thanks