I had blogged about HyperModel a while back, which is the best free tool that I have come across for modelling XML documents as UML. (http://www.xmlmodeling.com/download)
I have found it (XmlModelling) immensely useful for understanding Soap-based webservices (such as WCF services) as it breaks down visually the inputs and outputs of an operation and the various data-types and enumerations that the service supports.
Unfortunately there are 2 problems with Hypermodel. 1. Hypermodel hasn’t been updated in a while (last update: 5 July, 2008) – my biggest worry is this awesome tool will just die off and not be updated to support changes to the XML specification. 2: The tool isnt exactly intuitive to use when it comes to modelling WSDL documents.
Here I plan to remedy the 2nd problem:
- First you need to download the WSDL documents associated with the web-service. In this case I am going to use this public facing soap-service: http://www.webservicex.net/WeatherForecast.asmx?WSDL
To do this I am going to use another awesome tool – SoapUI.
Once installed, you need to import the web-service into SoapUI. After that, right click on the service and select “Export Definition”.
- The above step will export the WSDl document. (Note: sometimes the SoapUI file dialog takes a while to become responsive – so be patient). Depending on the WSDL file, you will find that SoapUI exported the wsdl documents as a series of files with the extension .WSDL or .XSD. (note: I found that WCF4 exports a nice set of XSD documents, whereas older versions result in WSDL documents). If the file does not already have a XSD extension, rename the extension. (Hypermodel will only read XSD files).
- Start up Hypermodel. (if its your first time starting up Hypermodel, you might have to setup some preferences. Just choose the defaults – as these worked for me).
Next, open the file menu and select Import XSD.
- The Import XSD command will open the Import XSD Schemas dialog.
The parent folder is just a way for you to organize your imported XML document. Name it anything you want. The filename, needs to end with .XML, otherwise the Next button will not enable.
Click Next. - Click next on the next dialog.
- If everything ran correctly, you should end up seeing a tree of all the XML objects that were defined in the WSDL document.
- You can now select the elements that you need to visualize as UML and select the “Class Dynagram” option from the context menu.
- Voila!
Which should look like this:
References:
List of web-services on which you can try the above steps: http://www.visualwebservice.com/web-services.do
No comments:
Post a Comment