.NET Framework - Generate interface from wsdl

Asked By Peter Bradley on 02-Apr-08 04:21 AM
My apologies first of all for cross posting.  In my ignorance I posted
this in the .net remoting group before checking on the existence of this

I have to write an application that will interact with a Web service
exposed by a partner organisation.  Unfortunately the Web service will
not be available until late summer: too late for us to develop a client.

Ideally, therefore, I'd like to develop a client from the wsdl, which is
available.  For your information, I've posted to wsdl files on my
personal Web site:


As you will see, the first file imports the second.

In order to get something to work with, I have tried to construct an
interface for the Web service using the wsdl.exe utility:

C:\XmlProjects\SlcDatabaase>wsdl.exe /serverinterface

This fails with the following message:

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Cannot find definition for
Service Description with namespace
http://www.slc.co.uk/course/messages/1.0 is missing.
Parameter name: name

Can anyone see where I'm going wrong?

Many thanks

Peter Bradley

John Saunders [MVP] replied on 02-Apr-08 04:27 PM

/HEICourseDatabaseSchema.xsd appears to be missing.

John Saunders | MVP - Windows Server System - Connected System Developer
Peter Bradley replied on 03-Apr-08 03:21 AM
Apologies.  The schema files are all there now.

They were all present in the same folder when I tried to run wsdl.exe
against them on my local machine, so their lack is not the reason for
the failure I was getting.

Apologies for the incomplete info, and thanks for looking at it.


Peter Bradley replied on 03-Apr-08 04:14 AM
I realised from this response that if I put all the files up on my Web
server (.wsdl and .xsd) I could create a Web reference to it in VS and
let VS do all the work for me.

This worked fine.  The reference.cs file created with the Web reference
is all I need.

Thanks for the help.

John Saunders [MVP] replied on 03-Apr-08 08:18 AM
I just got this to work using WSDL /serverInterface and by specifying the
URL on the command line. Try it with the URL instead of with a file path.
John Saunders | MVP - Windows Server System - Connected System Developer