• Share
  • ?
  • Profiles ▼
  • Communities ▼
  • Apps ▼

Blogs

  • My Blogs
  • Public Blogs
  • My Updates
  • Administration
  • Log in to participate

▼ Tags

 

▼ Similar Entries

z/OSMF publish summa...

Blog: IBM z Systems...
gaojins 060000RNY5
Updated
0 people like thisLikes 0
CommentsComments 1

Performance tuning t...

Blog: Application P...
NoelLewis 060001F069
Updated
1 people likes thisLikes 1
No CommentsComments 0

How the Page Compose...

Blog: Websphere Com...
Jacky Yan 50JTYSWH2S
Updated
0 people like thisLikes 0
No CommentsComments 0

DataPower as a REST ...

Blog: Me, myself an...
Offline 0600018ME9
Updated
1 people likes thisLikes 1
No CommentsComments 0

Understanding the NF...

Blog: Application I...
Aidan Harbison 310000JE0Y
Updated
4 people like thisLikes 4
No CommentsComments 0

▼ Archive

  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • September 2018
  • March 2018
  • November 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • October 2016
  • May 2016
  • April 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011

▼ Blog Authors

HermannSW

View All Entries
Clicking the button causes a full page refresh. The user could go to the "Entry list" region to view the new content.) Entry list

dpWsdlDraw

HermannSW 2700006U54 | | Tags:  publish ?wsdl draw datapower graphviz wsdl layout svg ‎ | 2 Comments ‎ | 11,641 Views

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:

image


 

 

 

 

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

image


 

Modified on by HermannSW 2700006U54
  • Add a Comment Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry
Notify Other People
notification

Send Email Notification

+

Quarantine this entry

deleteEntry
duplicateEntry

Mark as Duplicate

  • Previous Entry
  • Main
  • Next Entry
Feed for Blog Entries | Feed for Blog Comments | Feed for Comments for this Entry