Help needed regarding calling webservices

Discussion in 'ASP .Net Web Services' started by Nagul, Sep 17, 2004.

  1. Nagul

    Nagul Guest

    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
    Nagul, Sep 17, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. steen
    Replies:
    3
    Views:
    414
    steen
    Jun 9, 2006
  2. Jack Wright
    Replies:
    3
    Views:
    234
    Emil Kvarnhammar
    Jul 30, 2004
  3. Arne

    Calling webservices from a Pocket PC

    Arne, Nov 26, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    186
    Dan Rogers
    Nov 30, 2004
  4. kiran & Dev

    wse router calling 2 diff webservices

    kiran & Dev, Feb 25, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    167
    kiran & Dev
    Feb 25, 2005
  5. Rainier [MCT]
    Replies:
    0
    Views:
    158
    Rainier [MCT]
    Jan 23, 2006
Loading...

Share This Page