tags:

views:

288

answers:

2

Hello, thanks for any assistance.

I'm creating a wcf web service for an external client. The client is requesting a copy of the wsdl. I currently am waiting on being able to provide the client with access to the service.

when I go to my local webserver running the service (http://localhost/Services.svc?wsdl) I am shown the wsdl, the data provided contains the method signatures (from the .svc code behind), but does not contain the included model objects (Customer, Order, ext).

To get those objects, I can find the references in the shown data and go to the url

For me to provide all needed information to the client, so that they have the entire wsdl should I provide the main schema and also each of the imported schemas?

or is there any other way of accomplishing this (other then the client hitting a server)

ie: is there a way of packaging all of them within one file?
(Seems like something would be available to extract each of those files?)

If I were to give a .zip with each of the files, would that be enough?

Thanks, Steven

A: 

If you manually downloaded each and every sub-WSDL and XSD referenced, then yeah, it would work; but it's cumbersome, to say the least.

An option worth looking into would be to use Christian Weyer's WCF extensions for flattening your WSDL so that WCF generates everything in a single file, then giving that to your client.

tomasr
A: 

WCF packages up its WSDL and XSD (XML schema to describe the data being sent around) into various pieces, as you've already noticed. Those are referenced from your main WSDL with additional href's.

Or even better: you can run the "svcutil -metadata" command on the command line against the DLL or EXE which contains your service implementation - this will create all the needed files (typically several WSDl and several XSD) in the directory where you run the svcutil command. That's usually a more reliable way than piecing together the WSDL and XSD files from the ?wsdl URL (you usually end up missing one or two files).

Marc

marc_s
Perfect, thanks marc_s. That is exactly what I was looking for.Quick question, it also created two file: schemas.microsoft.com.2003.10.Serialization.Arrays.xsdschemas.microsoft.com.2003.10.Serialization.xsdI don't need to provide these do i?Thanks, Steven
stevenrosscampbell
Yes, definitely - you need to send these as well. The main WSDL references those - if you don't send them, your client might not be able to create a client proxy from the provided files.
marc_s
Hey marc_s.Thanks again. All the best. Steven
stevenrosscampbell