Jaa


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.

Comments

  • Anonymous
    April 08, 2007
    This can be tricky at times. If all you want is the basic communication WSDL, you can get it by appending

  • Anonymous
    July 12, 2007
    Can I see the methods of what the service exposes using the .svc link....

  • Anonymous
    July 13, 2007
    You can get the method names by appending ?wsdl=wsdl0 to your .svc file. You'll not see the links to test the method as provided by asmx webservices though.

  • Anonymous
    January 30, 2008
    Is there any way I can get SOAP 1.1 output from a WCF svc file? I have to consume an existing WCF Service, but I'm required to use FW 1.1 for my project. Upgrading to FW 2.0 or better is out of the question.