473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2670
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.

"Bamse" <bd**************@yahoo.com> wrote in message
news:O9**************@TK2MSFTNGP14.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.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)

"Dilip Krishnan" <Di***********@discussions.microsoft.com> wrote in message
news:CF**********************************@microsof t.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.microsoft.com> wrote in message
news:CF**********************************@microsof t.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
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...
0
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...
0
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...
5
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
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...
2
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...
0
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...
5
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...
4
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 =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.