Re: writing/publishing/consuming



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,

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 this
visual
approach:

#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
rights.


--------------------
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.


.



Relevant Pages

  • Re: writing/publishing/consuming
    ... \par "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. ... Is there an advantage to using the command line? ... \par> and after writing a web service to convert temperatures between ... \par> Generating a proxy class of the service. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: security - web service - vb.net - Help....
    ... There are 2 projects - a web service and a vb.net dll. ... The dll might also be used by a stand-alone vb .exe or asp.net pages. ... form button_click event and the folder was copied successfully by the dll. ... >> If I type the command in a command window it executes successfully - ...
    (microsoft.public.dotnet.security)
  • Re: separate server for web services?
    ... > I assume I would add a 'web reference' instead of a regular reference, ... > the web service, or how do I tell the application where to find it. ... > having the dll proxy represent the web service, ... "using a web reference" and "having the dll proxy in the bin dir". ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: dll from aspx
    ... compile the class into a DLL with a run command. ... DLL can be decompiled so it will also need to be obfuscated. ... products offer obfuscsation ... > i`m making a web service based on .net..... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how can i convert .asmx file to a .ashx?
    ... wsewsdl2.exe is a tool that generates proxy code for Web service clients ... The proxy derived from ... When you build an XML Web service client, whether you use Visual Studio .NET ... a proxy class is generated to communicate with the XML Web service. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)

Loading