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:
http://dp-wsc:2234/12,16:9.70.152.55:6515/
The service listens on port 2234 of my "dp-wsc" box (6.0.0.14).
"12,16" is the initial size for display in the browser (in inches).
"9.70.152.55:6515/" is stripped WSDL query URL, this is complete:
"http://9.70.152.55:6515/?wsdl"
The service has three rules:
The 1st rule is responsible for serving Viz.js, the JavaScript library doing the complete graphviz layout (see here).
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:
https://stamm-wilbrandt.de/en/blog/backup-dpWsdlDraw.zip
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.
I made again use of "data:text/javascript;base64,..." URL. This increases the size of "Viz.js" by 4/3, but allows to save the result HTML page as a single, self contained file without any external dependencies.
Hermann.
You can open the full drawing in your browser as SVG (scalable) with this URL:
https://stamm-wilbrandt.de/en/blog/12,16%209.70.152.55%206515.html