As you may know, DataPower does rewrite the WSDLs and Schemata a WSP gets created on optimized for compilation.
DataPower WSDL publisher "...?wsdl" does present the rewitten WSDLs and Schemata.
For debugging a PMR WSDL issue I needed to vizualize the complete WSDL/Schema import/include structure. And so I wrote adpWsdlDraw service that allows me to pass a DataPower hosted WSDL URL, and the service traverses all import/include and generates a SVG (Scalable Vector Graphics) drawing that gets displayed in your browser. "Scalable" means that you can zoom in arbitrarily without loss of drawing quality, which is needed given the big amounts of WSDLs/Schemata being the basis of customer PMRs I saw. Please see at bottom for example (screenshot).
The service is called from a browser, and as part of the URL the WSDL information is passed as well:
The service listens on port 2234 of my "dp-wsc" box (188.8.131.52).
"12,16" is the initial size for display in the browser (in inches).
"184.108.40.206:6515/" is stripped WSDL query URL, this is complete:
The service has three rules:
The 2nd (nasty) rule is for dealing with "favicon.ico" requests browsers do.
The 3rd rule is the working rule, 130 lines XSLT that does it all:
- <xsl:template match="/"> creates the HTML page frame needed and calls "scanWsdl"
- <xsl:template name="scanWsdl"> draws a WSDL node and edges for imported WSDLs/Schemata
- <xsl:template name="scanXsd"> draws a Schema node and edges for imported/included Schemata
- <func:function name="func:edge"> generates a Graphviz edge
- <func:function name="func:node"> generates a Graphviz node
- <func:function name="func:color"> selects the color of a node
Here is the domain backup:
So what you can do with it?
First you can just import and use it against your own WSP WSDLs.
No need to understand the details in that case.
And you can at least get a "visual" understanding of its complexity.
Next you can understand how a DataPower service generating a SVG layout works and make use of that for your own projects.
Then you can modify the service to your needs as well.
By the way, Graphviz SVG drawings are interactive, if you move the mouse over an edge it will show you the edge's nodes.
The traversal in the stylesheet is a bit sloppy, I did no duplicate node detection and therefore tons of nodes and edges get generated multiple times. Grapvviz statement "concentrate=true" was good enough for me to eliminate all duplicates in the final drawing. Additionally it joins common edge parts giving a better view on the structure compared when each edge would be drawn separately.
You can open the full drawing in your browser as SVG (scalable) with this URL: