A possible approach to the problem of wanting to extend the WSDL generation in generic ways, such as adding in new elements to the WSDL or manipulating the WSDL i.e. replacing <xs:include with inlined schemas
The approach is to modify the write method of WSDLBuilder to implement a Template pattern, then use a Strategy pattern to inject into this method the behaviours one wants to do, I've provided an interface WSDLBuilderExtension that implements the template, an adapter to allow quick anonymous overrides and nesting of multiple [decorated] WSDLBuilderExtensions, and a WSDLBuilderFactory that transparently decorates existing factories with the desired WSDLBuilderExtension(s).... hope this makes sense <g>
Included in the ZIP file is a patch against SVN HEAD (r 1737) And some example code showing how it may be used to add BPEL partner links to WSDL files on the fly.
One thing to note is that the Extension class instances are re-used where-as the WSDLBuilder instances aren't so there may be some thread-safety issues to consider around here, also this code is not properly commented, I'm submitting it purely for consideration of the approach