Saturday, May 31, 2008

Web Services Contract First???

I know we .NET developers have been spoiled for a while.

We go on VS2005 and create a new web site project, select the type of project as web service and voila, we land on a page where we can start typing new methods for this class and mark them as web methods with a single annotation. VS2005 does all the plumbing for us creating the wsdl and even publishing the web service for us with another click.

But, is this good enough?

If your enterprise is fully .NET, there is no harm, but if you want to inter-operate with other platforms, they might not understand what your WS said...

VS2005 implements WS-I Basic Profile 1.1, but I believe you can still use .NET types such as special collections...that won't have a Java counterpart.

WSCF existed for a long time on the Java world, VS2005 comes with two command line utilities that can serve to the purpose (xsd.exe and wsdl.exe) but, imho, they are hard to use.

You can always request to your manager a license of Altove XMLSpy...
Or go for this freeware tool made by thinktecture:

WSCF

The tool is good if you define all of your types in a single .xsd file. If you have several files with your types and you import from one namespace into one of your schema files, you might have troubles...

Also the pumbling this utility generates is only for SOAP web services, not for REST web services.

I talked to the Java guru in the office and he mentioned that WSCF was long gone from the Java world, with Eclipse, he only had to define his business payload and the plumbing was done for him on any transport protocol he would choose...So they sort of had to define the payload first, not exactly the contract first...

That triggered my curiosity. I wonder if there is anything like it on VS2008 with WCF...

If you know and can lit the path, please comment. I'm planning to play with this on the next few hours.

Happy coding!

Labels:

0 Comments:

Post a Comment

<< Home