mace-opensaml-users - Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported
Subject: OpenSAML user discussion
List archive
Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported
Chronological Thread
- From: Jochen van Waasen <>
- To:
- Subject: Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported
- Date: Fri, 20 Nov 2009 22:44:54 +0100
Hi Jim,
sounds good but I assume you are using a simple web application (servlet, no webservice) right?
I am using webservices and the webservice engine has its own org.w3c.dom.Text implementation.
All the classes that implement org.w3c.dom.Text within the webservice engine do not implement that function.
It is correct that IBM ships a valid xerces parser for opensaml:
\IBM\SDP\runtimes\base_v61\deploytool\itp\plugins\org.apache.xerces_2.8.0.v200606131651
IBM\SDP\runtimes\base_v61\deploytool\itp\plugins\com.ibm.ccl.xtt.xslt4j_2.7.5.v200610160956\lib
These both contain a xerces parser. Xerces 2.8.0 holds the class needed:
xercesImpl.jar\org\apache\xerces\dom\TextImpl.class
(decompiled from the above class)
public String getWholeText()
{
if(needsSyncData())
synchronizeData();
StringBuffer stringbuffer = new StringBuffer();
if(super.data != null && super.data.length() != 0)
stringbuffer.append(super.data);
getWholeTextBackward(getPreviousSibling(), stringbuffer, getParentNode());
String s = stringbuffer.toString();
stringbuffer.setLength(0);
getWholeTextForward(getNextSibling(), stringbuffer, getParentNode());
return s + stringbuffer.toString();
}
The webservice engine com.ibm.ws.admin.client_6.1.0.jar has not a valid org.w3c.dom.Text implementation.
The exception mentions the class used for org.w3c.dom.Text implementation:
com.ibm.ws.webservices.engine.xmlsoap.dom.impl.DOMTextImpl.getWholeText
(decompiled from above class)
public String getWholeText()
{
throw new DOMException((short)9, Messages.getMessage("unsupportedDOMErr", "getWholeText", "org.w3c.dom.Text"));
}
So this implementation is not useful for opensaml!!
In my environment I have found the following .jars that contain classes that implement the org.w3c.dom.Text
\IBM\SDP\runtimes\base_v61\bin\ProfileManagement\plugins\com.ibm.websphere.v61.ext_6.1.100\runtimes\com.ibm.ws.webservices.thinclient_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\dom\impl\DOMTextImpl.class
\IBM\SDP\runtimes\base_v61\bin\ProfileManagement\plugins\com.ibm.websphere.v61.ext_6.1.100\runtimes\com.ibm.ws.webservices.thinclient_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\saaj12\SAAJ12Text.class
\IBM\SDP\runtimes\base_v61\FEP_staging\6.1.0.19-WS-WASWebSvc-EP0000019.pak
\IBM\SDP\runtimes\base_v61\FEP_staging\6.1.0.27-WS-WASWebSvc-EP0000027.pak
\IBM\SDP\runtimes\base_v61\plugins\com.ibm.ws.runtime_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\dom\impl\DOMTextImpl.class
\IBM\SDP\runtimes\base_v61\plugins\com.ibm.ws.runtime_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\saaj12\SAAJ12Text.class
\IBM\SDP\runtimes\base_v61\runtimes\com.ibm.ws.admin.client_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\dom\impl\DOMTextImpl.class
\IBM\SDP\runtimes\base_v61\runtimes\com.ibm.ws.admin.client_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\saaj12\SAAJ12Text.class
\IBM\SDP\runtimes\base_v61\runtimes\com.ibm.ws.webservices.thinclient_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\dom\impl\DOMTextImpl.class
\IBM\SDP\runtimes\base_v61\runtimes\com.ibm.ws.webservices.thinclient_6.1.0.jar/com\ibm\ws\webservices\engine\xmlsoap\saaj12\SAAJ12Text.class
I have checked some of the classes in these .jars that implement the org.w3c.dom.Text and none of them implements the getWholeText method !!!!
As I use webservices the webservice engine is used with its implementation of org.w3c.dom.Text.
Due to PARENT LAST (in my enterprise application and the wars) it should find the TextImpl in the xerces (which I am not able to use during startup).
In summary I think my issue is how to use the xerces that I ship with my application (make WebSphere accept it during startup).
In other words how to tell the webservice engine to use a different implementation (that from the xerces.jar) of the org.w3c.dom.Text implementation.
As I have a support contract I have raised a service request with IBM. I have sent a detailed description and my workspace in project interchange format.
Hopefully they come up with a solution to this.
Best regards
Jochen
But the webservice engine is not using it: :-(
Jim Cox wrote:
For what it's worth, I've been able to get open saml to work in WAS
6.1.0.19.
The container's default xml parser will work. There is no need to
package xerxes or xalan in web-inf/lib. Make sure there are no other
parsers that you are packaging in your web app. Make sure you set
"Classes loaded with application class loader first" on the ear AND the
web module. (2 places).
I've included a copy of the libs that are in my web-inf/lib. (Ivy
appended the version number).
bcprov-ext-jdk15-1.40.jar* clickstream-1.0.2.jar* com.springsource.javax.annotation-1.0.0.jar* commons-codec-1.3.jar* commons-collections-3.2.jar* commons-configuration-1.3.jar* commons-httpclient-3.1.jar* commons-lang-2.4.jar* ibatis-sqlmap-2.3.4.726.jar* jargs-1.0.jar* jcip-annotations-1.0.jar* jcl-over-slf4j-1.5.8.jar* joda-time-1.5.2.jar* log4j-1.2.14.jar* not-yet-commons-ssl-0.3.9.jar* opensaml-2.2.3.jar* openws-1.2.2.jar* slf4j-api-1.5.8.jar* slf4j-log4j12-1.5.6.jar* spring-2.5.6.SEC01.jar* spring-ldap-core-1.3.0.RELEASE.jar* spring-ldap-core-tiger-1.3.0.RELEASE.jar* spring-modules-jakarta-commons-0.8a.jar* spring-security-acl-2.0.4.jar* spring-security-core-2.0.4.jar* spring-security-taglibs-2.0.4.jar* spring-web-2.5.6.SEC01.jar* spring-webmvc-2.5.6.SEC01.jar* velocity-1.5.jar* xmlsec-1.4.2.jar* xmltooling-1.2.0.jar*
Good Luck.
-Jim
On Thu, 2009-11-19 at 21:18 +0100, Jochen van Waasen wrote:
Well, basically they want to send a consultant from the services devision :-)
They suggested that I upgrade to WebSphere 7.0.0.7 with built-in SAML support ....
I will try to update my WebSphere 6.1 to the latest fix pack level, maybe this helps.
Should the org.w3c.dom.Text be in the xalan.jar ?
Thanks
Jochen
Chad La Joie wrote:
What was IBM's suggestion for this?
Jochen van Waasen wrote:
Hi guys!
I am really desperate because I can not make opensaml work in WebSphere. I guess this is a class loader issue but maybe someone knows ...
My issue is this:
org.w3c.dom.DOMException: WSWS3732E: Error: This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported.
at com.ibm.ws.webservices.engine.xmlsoap.dom.impl.DOMTextImpl.getWholeText(DOMTextImpl.java:210)
at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallTextContent(AbstractXMLObjectUnmarshaller.java:336)
I ship all opensaml .jars (plus xalan and xerces) with my enterprise application. The classloader for the app is set to APPLICATION FIRST. So it should look at the .jars that come with the enterprise application first before it tries to load other .jars. I have tried the endorsed mechanism of the jre and put in opensaml .jars (plus xalan and xerces) jars on the jre level but the error is still the same.
My code looks like this:
DefaultBootstrap.bootstrap();
UnmarshallerFactory unmarshallerFactory = Configuration
.getUnmarshallerFactory();
Unmarshaller unmarshaller = unmarshallerFactory
.getUnmarshaller(assertionElement);
// The next line produces the exception
Assertion samlAssertion = (Assertion)unmarshaller
.unmarshall(assertionElement);
I need to put something in my classpath so that com.ibm.ws.webservices.engine.xmlsoap.dom.impl.DOMTextImpl is not used.
What .jar does the Unmarshaller need?
Thanks
Jochen
- This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Jochen van Waasen, 11/19/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Chad La Joie, 11/19/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Jochen van Waasen, 11/19/2009
- RE: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Scott Cantor, 11/19/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Chad La Joie, 11/20/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Jim Cox, 11/20/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Jochen van Waasen, 11/20/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Jochen van Waasen, 11/19/2009
- Re: [OpenSAML] This DOM 3 API, method getWholeText of interface org.w3c.dom.Text, is not supported, Chad La Joie, 11/19/2009
Archive powered by MHonArc 2.6.16.