all groups > dotnet web services enhancements > september 2007 >
You're in the

dotnet web services enhancements

group:

Are web references required?


Are web references required? kelphis
9/12/2007 10:09:04 AM
dotnet web services enhancements:
I am creating a windows service that will communicate with several
different vendors. I plan to be able to pass the url for the vendor
to the windows service as an xml request. So since im not going to
have access to the URL before that I wont be able to create a web
reference from within the dev envirnoment. what is the best way to
connect with a web service using WSE2.0 or 3.0 with out the use of web
refences?
Re: Are web references required? Andrew Brook
9/13/2007 3:19:23 PM
Personally I don't normally use web references anyway. you can use the
wsdl.exe tool that comes with the framework to generate the class that you
need, i think theres even an option to set for automatically retrieving the
url from a config file rather than having it hardcoded.

Perhaps quicker than using wsdl.exe might be to add the web reference and
then view the hidden files under the reference. There should be a code file
under there with all method stubs in it. You can move that code into your
project and then delete the web reference. You may then one to alter the
constructor on the class to take in the url of the service.

Andrew

[quoted text, click to view]

AddThis Social Bookmark Button