Re: writing/publishing/consuming
- From: cj <cj@xxxxxxxxxxxxx>
- Date: Tue, 12 Feb 2008 08:32:06 -0500
Thank you.
Steven Cheng[MSFT] wrote:
Thanks for your reply..
"Whether it will generated cs file or dll" is not important for the two approaches as both of them can generate dll and cs file. The difference here is as following:
** In Visual Studio, the visual approach is integrated with IDE and as long as you use VS to generate the webservice proxy, IDE will help you do a lot of things(such as call the command with parameters get from your GUI input). Also, when you want to update a proxy, you can simply right click it to update.
** while for commandline approach, you need to figure out the commandline syntax and parameters (used to generate the service proxy) yourself. And next time you want to update the proxy, you need to execute the commandline task again.
I think commandline will be helpful for some cases that you want to automation the code generation process in code or do not Visual Studio(WSDL.exe is a .net framework sdk tool).
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Date: Mon, 11 Feb 2008 10:03:26 -0500
From: cj <cj@xxxxxxxxxxxxx>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: writing/publishing/consuming
Hi Steven,
Thanks, I figured it was another of those things where there were more than one way to do it. Out of curiosity why does it seem the command line method wants to create a .cs file and the visual approach seems to create a .dll file?
I guess the real question is, is it generally accepted to be good practice to use the visual approach in developing professional applications? Is there an advantage to using the command line?
Steven Cheng[MSFT] wrote:Hi Cj,visual
The article you mentioned does provide the steps to create and consume an ASP.NET webservice. However, as for client proxy generating, it demonstrates the way that use command line utility (wsdl.exe).
You can surely use the "Add Web Reference" GUI to generate proxy for webservice in Visual Studio. Here is a web article demonstrate thisapproach:rights.
#Build and Consume an ASP.NET Web Service
http://softwarecommunity.intel.com/articles/eng/2184.htm
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
--------------------
Date: Fri, 08 Feb 2008 16:19:58 -0500
From: cj <cj@xxxxxxxxxxxxx>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: writing/publishing/consuming
I might already know the answer to this one but I want to be sure. I've been looking at an article on how to write and consume a web
service (http://www.asp101.com/articles/colin/webservices/default.asp)
and after writing a web service to convert temperatures between
Fahrenheit and Celsius they said to do the following steps:
Generating a proxy class of the service. At your command prompt (I
have used VS.NET command prompt for this example.), use following
command to generate a proxy class that at client based on the web
service file tempConvertorCsharp.asmx we just create at server.
C:\inetpub\wwwroot\mydotnet\WebServ>wdsl /l:C#
/n:TempConvertorClientCsharp
http://24.156.78.145/mydotnet/WebServiceLib/TempConvertorCsharp.asmx?WSDL
Then
Using the created proxy class to invoke an available service for client
self. To make the proxy be a pre-compile class .dll(or exe) at your
command prompt, type in:
csc /t:library /out:..\..\bin\TempConvertorClientCsharp.dll
/r:System.dll /r:System.Web.Services.dll /r:System.Xml.dll
TempConvertor.cs
I thought in the project you added a web service and chose the wsdl file
and that was it, so, I tried making an asp.net program and just adding a new web service and selecting web services on local machine. I think when I did this it automatically did the above steps. It took quite awhile adding it. When done I noticed and .xml, .pdb, and .dll files in C:\Inetpub\wwwroot\bin. I know .net usually gives you a dozen ways to do the same thing. Is this one of those times where I can skip the command line steps and do what I did?
P.S. I wasn't actually using the example tempconverter web service. I was using my own written in VB.
- References:
- writing/publishing/consuming
- From: cj
- RE: writing/publishing/consuming
- From: Steven Cheng[MSFT]
- Re: writing/publishing/consuming
- From: cj
- Re: writing/publishing/consuming
- From: Steven Cheng[MSFT]
- writing/publishing/consuming
- Prev by Date: Re: writing/publishing/consuming
- Next by Date: Re: Adding Web Service Reference from SharePoint lower level site
- Previous by thread: Re: writing/publishing/consuming
- Next by thread: Re: Adding Web Service Reference from SharePoint lower level site coll
- Index(es):
Relevant Pages
|
Loading