WSDL for WCF Service

This can be tricky at times.

If all you want is the basic communication WSDL, you can get it by appending ?WSDL to the .svc file. This will output the required WSDL. A sample for this would be something like: https://localhost/MyService/Service.svc?WSDL

But sometimes you want to see everything that is produced. Especially, if you are used to ASMX way of development, you'd want to see the complete WSDL instead of the communicaiton portion. Here is where WCF strikes.

There is not just one, but several url's you need to browse before getting the required stuff.

First check in the content if you have any additional WSDL, or you can simply do a brute-force method.

https://localhost/MyService/Service.svc?WSDL =WSDL0 will give you additional information. There might be times (depending on your service) you should be looking for WSDL1. No point playing around as this is what the most you can go through.

Now, all you have is the complete WSDL, though in different files. If you look into the content, you still miss the type information (if you are using any custom data contracts). This is where your probing power will help you.

Look into the WSDL0 file to check for the XSD links. If you are lazy, again retort to the brute-force.

https://localhost/MyServoce/Service.svc ?XSD=XSD0will give you first level information of types. Depending on your case, you might want to look for XSD1 and XSD2 to get the complete information. Again, no point in playing around as this the max you can get.

When are done with this, you've all the information requried.