In Sparx Systems EA, a simple drag-and-drop operation will generate a WSDL. You can then edit the generated artifacts -- Service, Binding, PortType, etc. -- to adapt them to your organization's naming convention and to add to the bindings and operations. This blog post describes how to rename the toplevel element in the <types> section which is, by default, the same as the type name.
Nobody wants an element name "OrderRequestType".
This screenshot shows a WSDL generated by EA. Some renaming has taken place for the Service, Binding, PortType, Operation, and Messages sections. The Types section is left with the original values.
|WSDL Generated by EA with Some Mods|
|Types Diagram with Generated Types|
The resulting WSDL section follows.
|WSDL Generated by EA|
To adapt the WSDL to your organization's naming conventions, begin by renaming the complexTypes. Select one of the objects and hit Alt-Enter to bring up the Properties dialog. Rename the object.
|OrderResponseType used for complexType (good); for element (bad)|
To have properly named elements, add your own to the types section by dragging-and-dropping. From the tools, drag an element object. Use the ... button to link up the element -- named orderRequest -- with the type "OrderRequestType".
|A New Toplevel Element|
|New Toplevel Elements Available to Remaining WSDL|
It's possible to turn off Garden of Eden authoring in EA, but not in the context of generating WSDL. The setting is only available when generating XSDs, so if you want to continue using the WSDL generation capability without separating the types into their own XSDs, you'll have to live with the extra elements. (The settings does not "cascade" from the WSDL generation to the <types> section.)
|For XSD Generation Only|