Results 1 to 4 of 4

Thread: Authentication in Webservice constructor

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    Uppsala, Sweden
    Posts
    20

    Authentication in Webservice constructor

    Is there a way of creating multiple constructors in a webservice?
    I would like to perform a login procedure in the ws constructor, with this i mean when i refrence the webservice i could use the default constructor if i dont pass any values and if i pass uid and pwd it would use the other constructor and log me in and therby letting me use more parts of the webservice.. Does i make sens?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I think you can still overload constructors in a webservice, but if not then just make a seperate Authenticate method that does the samething and call it after the object is initialized.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    Uppsala, Sweden
    Posts
    20
    The problem is that if I call a function after the Sub New then I don´t have the UId and Pwd arguments. The problem i am having is that i don´t want to have to call a login function first. I can do as you say buy then I would have to let that function take input parameters. The general idea is that you supply your uid and pwd when you create the instance of the webservice. If I would have to create a seperate login method that would take the uid and pwd parameters, the whole idea of letting the webservice authenticate in the constructor would be gone.

    regards
    Henrik

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Whats the difference if its in the constructor or not?

    Or if you must have it then switch to remoting instead of a Web Service.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width