472,328 Members | 1,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 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 2589
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. ---...
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...
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...
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 ...
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...
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...
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...
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...
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...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...

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.