Ask a Question related to ASP.NET Web Services, Design and Development.
-
Prasanna Padmanabhan #1
How to generate WSDL files during build time?
Hi,
We have a web serivce in our build system. There are 2 clients for the web
service. We would like to automatically genrate the wsdl file and the client
proxies during build time, so that, if the interfaces changed at any time,
we come to know about it during build time (build would break) rather than
during run time. I know how to generate the client proxy from the WSDL file
using WSDL.exe. But how do I generate the WSDL file itself during compile
time?
Please help.
Thanks,
Prasanna Padmanabhan
Prasanna Padmanabhan Guest
-
Slooow Build time
Flex3 take 10min to build my project, some times 5 just to save a change My environment WinXP 2g ram Flex 3 Eclipse 3.3 The Eclipse CFG... -
Using wsdl.exe to generate code
I create a very simple helloworld webservice using vs.net (let us call it myservice.asmx).I browse to the correspnoding wsdl -... -
How To control how WSDL generate schema for nested .NET classes ? (part 2)
Hi, I've got another issue about how WSDL handles nested classes. consider this type : Public Class CMPXQueryEnvResponse Public Envelope() As... -
How To control how WSDL generate schema for nested .NET classes ?
Hi, is there any attrubute I can place on the web service side to control how nested types are defined in the WSDL ? basically I'd like that such... -
Fail to generate proxy .cs file using WSDL tool
I am hosting remoting object under IIS. When I try to generate proxy *.cs using WSDL.exe tool it fails. (see error message below). I suspect this... -
Dino Chiesa [Microsoft] #2
Re: How to generate WSDL files during build time?
The only way to do this is to run the ASMX through ASP.NET.
There are 2 approaches. One is to actually deploy the ASMX file into a
running IIS with ASP.NET installed, then just httpget the URL for thew WSDL,
eg
[url]http://yourserver/vroot/Service1.asmx?WSDL[/url]
To get the WSDL in a build, you can use any command-line httpgetter utility,
even something as simple as this javascript:
// getWSDL.js a simple command-line WSDL getter.
// Call it like this:
// cscript getwsdl.js <url>
//
// output goes to stdout.
//
var XMLDoc, XSLDoc ;
XMLDoc = WScript.CreateObject("MSXML2.DOMDocument") ;
XMLDoc.async= false;
XMLDoc.load(WScript.Arguments(0)); // exception here if the ASMX does not
compile successfully. The result is not XML, it is HTML !!
WScript.Echo(XMLDoc.xml);
WScript.Echo("");
Option 2 is to build a utility to host ASP.NET, and compile the ASMX, and
produce the WSDL. In this case you wouldn't need IIS, but you'd need to
build this util yourself. This is attractive, because you do not need to
deploy to IIS. However, the catch is that since you are not deploying to
your server, you have to be concerned about the availability of libraries
that may be referenced by the ASMX.
Search for articles on "hosting the ASP.NET runtime" to explore this.
eg,
[url]http://www.neward.net/ted/Papers/HostingASPNET/HostingASPNET.html[/url]
Here is an simplistic example console utility that hosts the ASP.NET
runtime, compiles an ASMX and produces the WSDL on the console.
[url]http://www.winisp.net/cheeso/srcview.aspx?file=asmx2wsdl.cs[/url]
Cassini is an example of a pre-built server that hosts ASP.NET (and source
code is available). Using a server might be more attractive because the
startup time of an ASP.NET host is significant. A server that runs
continuously only incurs this cost once (at startup). A command line util
that hosts ASP.NET must incur the cost with every invocation.
Using Cassini to produce WSDL from ASMX is very much like using IIS to do
the same, except, it is not the full IIS. This may be a good thing or a bad
thing depending on your requirements.
Find more about cassini on
[url]http://www.asp.net/Projects/Cassini/Download/Default.aspx?tabindex=0&tabid=1[/url]
-Dino
"Prasanna Padmanabhan" <prasannap@citrix.nospam.com> wrote in message
news:ODiti9oaEHA.1048@tk2msftngp13.phx.gbl...client> Hi,
>
> We have a web serivce in our build system. There are 2 clients for the web
> service. We would like to automatically genrate the wsdl file and thefile> proxies during build time, so that, if the interfaces changed at any time,
> we come to know about it during build time (build would break) rather than
> during run time. I know how to generate the client proxy from the WSDL> using WSDL.exe. But how do I generate the WSDL file itself during compile
> time?
>
> Please help.
>
> Thanks,
> Prasanna Padmanabhan
>
>
Dino Chiesa [Microsoft] Guest
-
Stef #3
Re: How to generate WSDL files during build time?
You can use http://wsdlgenerator.codeplex.com, this is a tool to generate a WSDL file from a c# dll which contains one more Microsoft WebServices.
Stef Guest



Reply With Quote

