Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2004

Tip: Looking for answers? Try searching our database.

consuming a webservice form another webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bamse - 13 Sep 2004 17:16 GMT
Hi all,
The problem is as follows:
I need to authorize a user: through a WS; if a setting is on, the webservice
will look in the local "database", if the setting is off it will connect to
the server ip that is set in the configuration and call the same WS to check
the user in the remote "database".

So far I don't know if I can call a webservice method from a webservice
method...

Is there a such way?

Thank you,
Daniel
Jared - 14 Sep 2004 01:00 GMT
Yes, use the Begin and End versions of your method to process the call
asynchronously. Do a little research on "Asynchronous WebService" or
"Calling a webservice asynchronously" - something to that nature.

> Hi all,
> The problem is as follows:
[quoted text clipped - 13 lines]
> Thank you,
> Daniel
Dilip Krishnan - 15 Sep 2004 03:41 GMT
You sure can. All you got to do is create a web reference and use the proxy
to call the other web service

> Hi all,
> The problem is as follows:
[quoted text clipped - 10 lines]
> Thank you,
> Daniel
Bamse - 20 Sep 2004 10:24 GMT
I must've been not quite clear...
there's the scenario:

myWinFormApp
{
myWebservice WS1;

bool myWinFormApp.Auth(userID)
{
 return ws1.auth(userid);
}
}

myWebService
{
myWebService ws2;
[Webmethod...]
public bool Auth(userid)
{
   if (localServer is defined)
       return local Auth(userid)
   else
      return ws2.Auth(userid)        //in the web.config there is a custom
key: "remote server" (made at install)
// and the webservice on that "remote server" is called to authorize the
user if the local one is not defined
}
}

that's the issue: how can I call the webservice on a particular server
(refered to by IP/DNS name)

> You sure can. All you got to do is create a web reference and use the proxy
> to call the other web service
[quoted text clipped - 13 lines]
> > Thank you,
> > Daniel
Bamse - 20 Sep 2004 11:55 GMT
yeah, after some tinkering, I got it; but instead of addind a reference to
the ws itself  I made a proxy using wsdl and add it to the project ( kind of
reference though...:)) )

thanks for opening my eyes

> You sure can. All you got to do is create a web reference and use the proxy
> to call the other web service
[quoted text clipped - 13 lines]
> > Thank you,
> > Daniel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.