473,554 Members | 3,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

consuming a webservice form another webservice

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
Nov 21 '05 #1
4 2698
Yes, use the Begin and End versions of your method to process the call
asynchronously. Do a little research on "Asynchrono us WebService" or
"Calling a webservice asynchronously" - something to that nature.

"Bamse" <bd************ **@yahoo.com> wrote in message
news:O9******** ******@TK2MSFTN GP14.phx.gbl...
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

Nov 21 '05 #2
You sure can. All you got to do is create a web reference and use the proxy
to call the other web service

"Bamse" wrote:
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

Nov 21 '05 #3
I must've been not quite clear...
there's the scenario:

myWinFormApp
{
myWebservice WS1;

bool myWinFormApp.Au th(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)

"Dilip Krishnan" <Di***********@ discussions.mic rosoft.com> wrote in message
news:CF******** *************** ***********@mic rosoft.com...
You sure can. All you got to do is create a web reference and use the proxy to call the other web service

"Bamse" wrote:
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

Nov 21 '05 #4
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
"Dilip Krishnan" <Di***********@ discussions.mic rosoft.com> wrote in message
news:CF******** *************** ***********@mic rosoft.com...
You sure can. All you got to do is create a web reference and use the proxy to call the other web service

"Bamse" wrote:
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

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
345
by: Dominick Baier | last post by:
sure. just get the client proxy for the web service you want to call through "Add Web Reference" in your "base" web service. thats it. --- Dominick Baier - DevelopMentor http://www.leastprivilege.com nntp://news.microsoft.com/microsoft.public.dotnet.framework.webservices/<O9SUP0amEHA.2880@TK2MSFTNGP14.phx.gbl>
0
2876
by: Jessard | last post by:
Hi all, I am trying to consuming a .NET web service from a standard (classic) ASP page. I have come across a few articles which describe that it can be done as follows (after installing the Soap Toolkit 2.0): <html> <head> <title>Calling a webservice from classic ASP, using the SOAP Toolkit</title> <body>
0
1553
by: plmanikandan | last post by:
I need to develop a application to consume a webservice. For consuming web service i tried a example in Consuming a Web Service in C# in http://www.csharphelp.com.But i am uanble to use that webservices in http://upload.eraserver.net/circle24/worldtime/worldtime.asmx?WSDL.Can anybody give me simple example(website link) for consuming...
5
17113
by: Preben Zacho | last post by:
Anyone that has a link or description that simply as possible shows how to add a web reference to a class library in C# and consuming it? TIA PZ
0
1228
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've attached the sample client source code in vb6 : __________________________________________________________________ '********************* Created...
2
2780
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've attached the sample client source code in vb6 : __________________________________________________ ________________ '********************* Created...
0
1219
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've attached the sample client source code in vb6 : __________________________________________________ ________________ '********************* Created...
5
5536
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've attached the sample client source code in vb6 : __________________________________________________ ________________ '********************* Created...
4
5982
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy = proxyObject; It doesn't works, it returns a error HTTP 407: Proxy Authentication Required ( Access is denied. ). But my proxy don't need a user...
0
7584
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7783
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7547
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7879
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6129
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5426
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1117
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.