PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Regarding web service

Reply

Regarding web service

 
Thread Tools Rate Thread
Old 12-02-2004, 10:50 AM   #1
P
Guest
 
Posts: n/a
Default Regarding web service


Hi.

I have a question about webservices. When you add a web reference to a
project ypu get a .wsdl, a .disco and a reference.map file as well as the
proxy class. This reference points to the computer hosting the web service.
Now I want to be able to configure the IP address that I have stored in the
registry so taht it will work on every computer hosting this web service and
not just the one used during development. Where in code do I have to change
the URI to make it all work.

Please advice or refer me to some good articles on the subject.
What i dont want to do is reset the URI property on the proxy class after I
instantiate it. It should be handled automatically.

//Regards

<P>


  Reply With Quote
Old 12-02-2004, 04:42 PM   #2
Chris Stephens
Guest
 
Posts: n/a
Default Re: Regarding web service

You can change the url property of your webservice class at runtime as
required.

Chris

"P" <patrik@objektor.se> wrote in message
news:ubm7XYV8DHA.3880@tk2msftngp13.phx.gbl...
> Hi.
>
> I have a question about webservices. When you add a web reference to a
> project ypu get a .wsdl, a .disco and a reference.map file as well as the
> proxy class. This reference points to the computer hosting the web

service.
> Now I want to be able to configure the IP address that I have stored in

the
> registry so taht it will work on every computer hosting this web service

and
> not just the one used during development. Where in code do I have to

change
> the URI to make it all work.
>
> Please advice or refer me to some good articles on the subject.
> What i dont want to do is reset the URI property on the proxy class after

I
> instantiate it. It should be handled automatically.
>
> //Regards
>
> <P>
>
>



  Reply With Quote
Old 16-02-2004, 11:44 PM   #3
David Kline [msft]
Guest
 
Posts: n/a
Default RE: Regarding web service

The best solution is for your client application can set the Url property
on your web service object. The other option is to modify the "Web
Reference.cs" (or .vb) file that is generated by "Add Web Reference" to do
the lookup. I advise against this approach since the web reference source
file is automatically generated and any customizations placed there will be
lost the next time the web reference is refreshed (using the "Update Web
Reference" option in Visual Studio).

Thanks,
David Kline
Microsoft .NET Compact Framework
--------------------------------
This posting is provided “AS IS” with no warranties, and confers no
rights.

Please do not send email directly to this alias. This alias is for
newsgroup purposes only. To correspond with me directly, remove the
'online' from
my alias.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off