Skip to content

Fix for xslt deprecation. - #804

Open
HansBusch wants to merge 7 commits into
developmentfrom
fix/wsdl-viewer
Open

Fix for xslt deprecation.#804
HansBusch wants to merge 7 commits into
developmentfrom
fix/wsdl-viewer

Conversation

@HansBusch

Copy link
Copy Markdown
Member

Add js based wsdl viewer.

@willysagefalk

Copy link
Copy Markdown
Member

For event.wsdl, the likely root cause is that it imports external WS-* resources over http://, for example OASIS and W3C WSDL/XSD files. The current viewer/XSL appears to dereference imported WSDL/XSD files using document(...), which means the browser-side SaxonJS transform tries to fetch these external HTTP resources. Since the preview page is served over HTTPS, this is likely blocked by mixed-content/CORS restrictions. The transform then fails and the viewer shows a blank page instead of an error.

Suggested fixes:

The browser-side WSDL viewer should not dereference remote absolute http:// or https:// imports directly. It should either skip them in preview mode, use local mirrored copies, or go through a same-origin proxy.
wsdl-viewer.html should catch SaxonJS transform errors and show a visible error message instead of leaving the page blank.
Standalone XSD files such as humanbody.xsd and humanface.xsd should probably not be routed through the WSDL viewer unless we also add a proper XSD viewer.
Minor cleanup: several generated links contain ../..//; these should be normalized to ../../.

Expected behavior: the viewer should render the local WSDL content even when external imports are skipped, and show a warning/error message instead of a blank white page.

Comment thread doc/index.html Outdated
<td></td>
<td><a href="AccessRules.xml">Access Rules</a></td>
<td><a href="../wsdl/ver10/accessrules/wsdl/accessrules.wsdl">accessrules.wsdl</a></td>
<td><a href="../wsdl/ver20/util/wsdl-viewer.html?file=../..//ver10/accessrules/wsdl/accessrules.wsdl">accessrules.wsdl</a></td>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra forward slash is used in many places.
../..//ver10/
to
../../ver10/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this extra slash is not required and may introduce issues.

@kieran242 kieran242 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HansBusch fixes still required.

Comment thread doc/index.html Outdated
<td></td>
<td><a href="AccessRules.xml">Access Rules</a></td>
<td><a href="../wsdl/ver10/accessrules/wsdl/accessrules.wsdl">accessrules.wsdl</a></td>
<td><a href="../wsdl/ver20/util/wsdl-viewer.html?file=../..//ver10/accessrules/wsdl/accessrules.wsdl">accessrules.wsdl</a></td>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this extra slash is not required and may introduce issues.

@HansBusch

Copy link
Copy Markdown
Member Author

The saxon parser seems to have difficulties to distinguish same name with different namespaces.
Media2 Profile Receiver definition is a bit weird as it refers to a complex extension of tr2:ReceiverConfiguration extending tt:ReceiverConfiguration.

@HansBusch

Copy link
Copy Markdown
Member Author

Rendering time is still unacceptable taking over seven seconds for larger schemas. We may need to consider publishing rendered html on the public website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants