Help needed regarding calling webservices

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top