Web Services: Is Weyer's code-based "contract first" any less painful?
Christian Weyer suggests passing message objects that are XmlSerialization attribute encrusted back and forth from ASMX web services.
Well...I suppose it's easer to read than staring at WSDL. However, it's certainly not as easy as:
[WebMethod]
public string HelloWorld()
{
return "Hello again...";
}
Dino Chiesa's response to my WSDL First: A road to Pain? posting was to do both together. That is, do your web method, look at the WSDL, and change your web method to improve the WSDL.
Of course you can't do [SoapDocumentService(ParameterStyle=SoapParameterStyle.Bare)] when you have multiple parameters when you do it. It's a lot easier to read and write in code, though. Maintenance of the contract, however, may be another story.