On Tue, 16 Nov 2004, Jim Murphy wrote: : Anand Natrajan wrote: : : > So what's my approach? Much as there is talk about writing WSDLs first, I : > prefer generating them automatically. I can do all the refactoring I want in : > my Java code and trust the java2wsdl generator to generate non-import WSDLs. : : So how do you keep you clients from breaking when you refactor? You : must hav econtrol over both ends or *really* lenient customers. :)
Yes, I do end up controlling both ends because all I have to do is hand out a single WSDL. With a separate schema, I have to worry about cases where one changes but the other doesn't. Given a WSDL is a contract, ergo an API, you don't really have much leeway to refactor at will. I typically refactor by _adding_ functionality to the service, i.e., increasing the number of operations. Occasionally, I may add to the data structures as well. In either case, simply handing out a larger WSDL is, IMO, simpler than handing out a larger WSDL in one case and a larger schema file in the other. But let's discuss a case where the WSDL/schema changes drastically because of underlying refactoring. As long as the WSDL generation is automatic, even if it is non-import, how have you lost any of the benefits of re-use? True, the data structures normally defined in the separate schema will be copied into the WSDL(s), but is that really so terrible? We live daily with code generators that may generate repetitive code, so how is this different? Just want to emphasise, BTW, that I am not being combative. I'd just like to know of a really good reason why I should switch allegiance to import WSDLs. Anand