Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   How to reference and call a webservice? (http://www.velocityreviews.com/forums/t383877-how-to-reference-and-call-a-webservice.html)

Big George 12-13-2006 02:25 AM

How to reference and call a webservice?
 
Hello Experts !

I'm using: VS.NET 2003

I have a webservice1.Service1. I have installed it on IIS. No problem.

I can access it through:
http://localhost/WebService1/Service1.asmx
or
http://192.168.1.109/WebService1/Service1.asmx

At my ASP.net application, I have referenced WebService1 as web
reference and on its window properties I have set up:
URL Behavior = Dynamic

On the web.config of the ASP.net application is stated:
<appSettings><add key="MyApplication.localhost.WebService1"
value="http://localhost/WebService1/Service1.asmx"/>
</appSettings>

On an aspx page, I call the webservice in this way:

Imports MyApplication.localhost
.....
Dim ws As New WebService1.Service1
Dim sMess As String = ws.HelloWorld

My question is: If I need to install the webservice in other server,
how could I reference it on my ASP.NET Application?

a. If I change the webservice to server 192.168.1.200, should I change
on the web.config:
<appSettings><add key="MyApplication.localhost.WebService1"
value="http://192.168.1.200/WebService1/Service1.asmx"/>
</appSettings>
b. How could I get this
value="http://192.168.1.200/WebService1/Service1.asmx" ?
On my ASP.NET app is stated:
Imports MyApplication.localhost

Is it possible to change the value on the web.config and not to change
anything on the aspx.vb ?

Thank you !


=?Utf-8?B?TWFuaXNoIEJhZm5h?= 12-13-2006 05:52 AM

RE: How to reference and call a webservice?
 
What you are looking for is availlable in following Link :

http://www.gotdotnet.com/Community/U...7-a42251a8ace3

Thanks and Regards,
manish bafna

"Big George" wrote:

> Hello Experts !
>
> I'm using: VS.NET 2003
>
> I have a webservice1.Service1. I have installed it on IIS. No problem.
>
> I can access it through:
> http://localhost/WebService1/Service1.asmx
> or
> http://192.168.1.109/WebService1/Service1.asmx
>
> At my ASP.net application, I have referenced WebService1 as web
> reference and on its window properties I have set up:
> URL Behavior = Dynamic
>
> On the web.config of the ASP.net application is stated:
> <appSettings><add key="MyApplication.localhost.WebService1"
> value="http://localhost/WebService1/Service1.asmx"/>
> </appSettings>
>
> On an aspx page, I call the webservice in this way:
>
> Imports MyApplication.localhost
> .....
> Dim ws As New WebService1.Service1
> Dim sMess As String = ws.HelloWorld
>
> My question is: If I need to install the webservice in other server,
> how could I reference it on my ASP.NET Application?
>
> a. If I change the webservice to server 192.168.1.200, should I change
> on the web.config:
> <appSettings><add key="MyApplication.localhost.WebService1"
> value="http://192.168.1.200/WebService1/Service1.asmx"/>
> </appSettings>
> b. How could I get this
> value="http://192.168.1.200/WebService1/Service1.asmx" ?
> On my ASP.NET app is stated:
> Imports MyApplication.localhost
>
> Is it possible to change the value on the web.config and not to change
> anything on the aspx.vb ?
>
> Thank you !
>
>


=?Utf-8?B?TWFuaXNoIEJhZm5h?= 12-13-2006 06:07 AM

RE: How to reference and call a webservice?
 
Hi,
for this i think you will need to invoke web services dynamically.Exact URL
where you will find details as to how to invoke web services dynamically is
as follows:
http://www.gotdotnet.com/community/u....GotDotNet.com)

Regards,
manish bafna

"Big George" wrote:

> Hello Experts !
>
> I'm using: VS.NET 2003
>
> I have a webservice1.Service1. I have installed it on IIS. No problem.
>
> I can access it through:
> http://localhost/WebService1/Service1.asmx
> or
> http://192.168.1.109/WebService1/Service1.asmx
>
> At my ASP.net application, I have referenced WebService1 as web
> reference and on its window properties I have set up:
> URL Behavior = Dynamic
>
> On the web.config of the ASP.net application is stated:
> <appSettings><add key="MyApplication.localhost.WebService1"
> value="http://localhost/WebService1/Service1.asmx"/>
> </appSettings>
>
> On an aspx page, I call the webservice in this way:
>
> Imports MyApplication.localhost
> .....
> Dim ws As New WebService1.Service1
> Dim sMess As String = ws.HelloWorld
>
> My question is: If I need to install the webservice in other server,
> how could I reference it on my ASP.NET Application?
>
> a. If I change the webservice to server 192.168.1.200, should I change
> on the web.config:
> <appSettings><add key="MyApplication.localhost.WebService1"
> value="http://192.168.1.200/WebService1/Service1.asmx"/>
> </appSettings>
> b. How could I get this
> value="http://192.168.1.200/WebService1/Service1.asmx" ?
> On my ASP.NET app is stated:
> Imports MyApplication.localhost
>
> Is it possible to change the value on the web.config and not to change
> anything on the aspx.vb ?
>
> Thank you !
>
>



All times are GMT. The time now is 05:41 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.