Bug 831445 - WSRP is failing when including OASIS WSRP WSDL
Summary: WSRP is failing when including OASIS WSRP WSDL
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal
Version: 5.2.1.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.2.ER04
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-13 01:01 UTC by Kyle Lape
Modified: 2023-03-02 08:28 UTC (History)
3 users (show)

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.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP-9337 0 Major Open Add ability for deployments to include jbossws-entities.properties 2013-12-11 18:25:55 UTC

Description Kyle Lape 2012-06-13 01:01:32 UTC
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-13 01:06:11 UTC
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@redhat.com 2012-06-13 10:08:12 UTC
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 07:37:00 UTC
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@redhat.com 2012-07-11 12:20:48 UTC
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 18:09:43 UTC
> 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@redhat.com 2012-07-13 14:35:21 UTC
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@redhat.com 2012-07-19 18:28:51 UTC
Kyle,
Did you get a chance to add the WSRP 2 files?

Comment 8 JBoss JIRA Server 2012-07-26 06:36:54 UTC
Jim Ma <ema> 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@redhat.com 2012-07-27 11:45:02 UTC
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 07:46:47 UTC
I changed directory from wsdl to wsrp, and edited jbossws-entities.properties file.

Comment 11 Michal Vanco 2012-08-07 09:33:14 UTC
Verified, both netunity v1 & v2 now works as expected.

Comment 12 hfnukal@redhat.com 2012-08-27 14:00:03 UTC
    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 23:38:41 UTC
    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 11:15:06 UTC
Verified again at 5.2.2 CR01


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