Bug 831445 - WSRP is failing when including OASIS WSRP WSDL
WSRP is failing when including OASIS WSRP WSDL
Status: VERIFIED
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal (Show other bugs)
5.2.1.GA
Unspecified Unspecified
high Severity high
: ---
: 5.2.2.ER04
Assigned To: hfnukal@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 21:01 EDT by Kyle Lape
Modified: 2015-08-31 23:32 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
OASIS changed the way HTTP WSRP WSDL requests were redirected. The requests redirected to a HTTP 302 response that included an XML document with a public ID, but no system ID. This caused an exception "SAXParseException: White spaces are required between publicId and systemId" to be raised. The fix introduces changes to the JBossWS entity resolver, which now uses the WSDLs and XSDs placed in the unzipped folder instead of the ones from the OASIS website. This corrects the issue, and restores expected functionality to Netunity v1 & v2.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Commits:
8809 by hfnukal at 2012-08-02 03:46:25 EDT (show)
8809 by hfnukal at 2012-08-02 03:46:25 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

Bug 831445 - WSRP is failing when including OASIS WSRP WSDL

7 files changed:

  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/jbossws-entities.properties (+28 / -0)
  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/wsrp/wsrp_v1_bindings.wsdl (+419 / -0)
  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/wsrp/wsrp_v1_interfaces.wsdl (+348 / -0)
  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/wsrp/wsrp_v1_interfaces.xsd (+6 / -0)
  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/wsrp/wsrp_v1_types.xsd (+850 / -0)
  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/wsrp/wsrp.wsdl (+18 / -0)
  • epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/META-INF/wsrp/xml.xsd (+287 / -0)
8810 by hfnukal at 2012-08-03 04:15:11 EDT (show)
8810 by hfnukal at 2012-08-03 04:15:11 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

Bug 831445 - WSRP is failing when including OASIS WSRP WSDL

1 file changed:

  • epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/picketlink-idm/idm-local-cache-config.xml (+2 / -0)


Attachments (Terms of Use)
wsrp-entity-fix.zip (11.78 KB, application/zip)
2012-06-12 21:06 EDT, Kyle Lape
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPAPP-9337 Major Open Add ability for deployments to include jbossws-entities.properties 2013-12-11 13:25:55 EST

  None (edit)
Description Kyle Lape 2012-06-12 21:01:32 EDT
Description of problem:
OASIS is now redirecting HTTP requests for their WSRP WSDL to HTTPS with an HTTP 302 response that includes an XML document that has a public ID but no system ID. This causes the following exception when JBossWS tries to parse the WSDL:

Caused by: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.getDocument(JBossWSDLReaderImpl.java:2128)
...many more stack frames

Steps to reproduce:
- Log in as root
- Navigate to Group / WSRP
- Create a consumer named: netunity
- Click "Create Consumer" button
- Producer WSDL URL: http://wsrp.netunitysoftware.com/WSRPTestService/WSRPTestService.asmx?Operation=WSDL
- Click "Refresh & Save" button
  
Actual results:
Exception above

Expected results:
Successful add
Comment 1 Kyle Lape 2012-06-12 21:06:11 EDT
Created attachment 591312 [details]
wsrp-entity-fix.zip

Attached is a potential fix/workaround.  To install:

cd $JBOSS_HOME/server/$PROFILE/conf
unzip /path/to/wsrp-entity-fix.zip

This will make the JBossWS entity resolver use the WSDLs and XSDs placed in the unzipped folder instead of the ones from the OASIS website.

I did have to slightly modify the catalog entries already in the file, and I don't know for sure if it affects the function of other JBossWS components;  I haven't run the full test suite with the new catalog installed.  I would be surprised if there were issues with the change, though.

I tried to implement a code change in JBossWSEntityResolver to enable the ability to put an entities file in a deployment, but I haven't been successful so far.  I've only done initial work on this, though, since this may not be needed in this situation.  If the provided workaround using wsrp-entity-fix.zip is considered sufficient, then this code change won't be needed.
Comment 2 claprun 2012-06-13 06:08:12 EDT
If it works for our customer, that's good for now. However, we should also probably include the WSRP v2 WSDL files. More importantly, though, moving forward, we need a JBoss WS supported way to add such mappings without requiring to modify the AS installation.
Comment 3 Kyle Lape 2012-06-18 03:37:00 EDT
Even though JBWS-3165 would be a great fix for this issue, it is not a trivial task to complete.  I believe JBPAPP-9337 is sufficient and rather simple to implement.  I have not tested a fix for JBPAPP-9337, so I can't say 100% that it is simple; I'm basing this upon my code analysis and how I think it should work.
Comment 4 claprun 2012-07-11 08:20:48 EDT
Kyle,

Why is the standard XML XSD resolved from the wsdl director? 

Also, there's a jax-ws-catalog.xml file in $JBOSS_HOME/server/$PROFILE/conf which contains mappings from Public/System Ids to local files, couldn't we piggy back on this file instead of adding a new file? I tried adding references to the WSRP files there but it didn't work so maybe this why EAP doesn't support catalog files properly?

I would also argue that the directory that contains the WSRP-specific schemas should be named differently (probably wsrp).

Finally, if the current solution is the only one that would work with minimal effort at this time (i.e. targeting EAP 5.1.2), could you also do the same changes so that the WSRP 2 schemas are also resolved locally, please?
Comment 5 Kyle Lape 2012-07-11 14:09:43 EDT
> Why is the standard XML XSD resolved from the wsdl director?

This can be changed easily.  Changing the dir name to 'wsrp' should be fine.

> What about conf/jax-ws-catalog.xml?

I'm not sure why this file is there for you, but it's only used by CXF.  JBossWS Native doesn't have any code to parse jax-ws-catalog.xml and add the information to the deployment metadata.  Adding this code would be a major change to code, and this is why I am opting for the simpler (code-change-wise) solution.

I see that file is in EPP 5.2.1, but I'm not sure why.  JBossWS Native doesn't use it (confirmed by Jim Ma).

> Can you add WSRP 2 schemas?

Sure, I can do this. Would you mind to give me the information needed to add these and test them?
Comment 6 claprun 2012-07-13 10:35:21 EDT
For the WSRP v2 files, please follow the same procedure as above using http://www.netunitysoftware.com/wsrp2interop/WsrpProducer.asmx?Operation=WSDL&WsrpVersion=Two as the WSDL URL instead. All files should be resolved locally afterwards.
Please do change the name of the directory to wsrp as well to avoid any confusion as to what its content is.
Thanks a lot!
Comment 7 claprun 2012-07-19 14:28:51 EDT
Kyle,
Did you get a chance to add the WSRP 2 files?
Comment 8 JBoss JIRA Server 2012-07-26 02:36:54 EDT
Jim Ma <ema@redhat.com> made a comment on jira JBPAPP-9337

Hi Kyle, I've added the ability to resolve the jbossws-entities.properties under WEB-INF/classes , and committed the fix to jbossws-native-3.1.2 branch. Can you please help try if that works in WSRP2 ? Thanks.
Comment 9 claprun 2012-07-27 07:45:02 EDT
As it stands Kyle's patch could be applied as-is. This would require altering the GateIn/EPP packaging as it modifies the underlying AS.
However, I would like this patch extended to also include the WSRP 2 schemas and change the schema directory name from "wsdl" (which is too generic) to "wsrp" (as that directory only contains WSRP-related schemas.
Comment 10 hfnukal@redhat.com 2012-08-02 03:46:47 EDT
I changed directory from wsdl to wsrp, and edited jbossws-entities.properties file.
Comment 11 Michal Vanco 2012-08-07 05:33:14 EDT
Verified, both netunity v1 & v2 now works as expected.
Comment 12 hfnukal@redhat.com 2012-08-27 10:00:03 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: OASIS is now redirecting HTTP requests for their WSRP WSDL to HTTPS with an HTTP 302 response that includes an XML document that has a public ID but no system ID.
Consequences: Ghrows exception SAXParseException: White spaces are required between publicId and systemId.
Fix: JBossWS entity resolver use the WSDLs and XSDs placed in the unzipped folder instead of the ones from the OASIS website.
Result: Verified, both netunity v1 & v2 now works as expected.
Comment 13 Jared MORGAN 2012-08-27 19:38:41 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1,3 @@
-Cause: OASIS is now redirecting HTTP requests for their WSRP WSDL to HTTPS with an HTTP 302 response that includes an XML document that has a public ID but no system ID.
+OASIS changed the way HTTP WSRP WSDL requests were redirected. The requests redirected to a HTTP 302 response that included an XML document with a public ID, but no system ID. This caused an exception "SAXParseException: White spaces are required between publicId and systemId" to be raised.
-Consequences: Ghrows exception SAXParseException: White spaces are required between publicId and systemId.
+The fix introduces changes to the JBossWS entity resolver, which now uses the WSDLs and XSDs placed in the unzipped folder instead of the ones from the OASIS website.
-Fix: JBossWS entity resolver use the WSDLs and XSDs placed in the unzipped folder instead of the ones from the OASIS website.
+This corrects the issue, and restores expected functionality to Netunity v1 & v2.-Result: Verified, both netunity v1 & v2 now works as expected.
Comment 14 Viliam Rockai 2012-08-28 07:15:06 EDT
Verified again at 5.2.2 CR01

Note You need to log in before you can comment on or make changes to this bug.