|
Problem |
Upgrade of WebSphere® Application server from version
v4.0.2 to v4.0.5 can cause problems with code written with the
compatibility API. Since the compatibility API is deprecated, code should
be changed to use the TrAX API.
Sample of lines in the sample code:
try
{
if (xml != null)
{
XSLTParser parser = new XSLTParser();
htmlOut = parser.transformUsingFile(xslTemplate, xml);
}
}
catch (XSLTParserException e)
{
outMsg.append("Error at XML Parser: " + e.toString());
System.err.println("Error at XML parser: " + e.toString());
}
Were replaced with:
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new
StreamSource("xmlfile.xsl"));
StreamSource inputDocument = new StreamSource(new
StringReader(xml));
transformer.transform(inputDocument, new
StreamResult(System.out)); |
|
Cause |
Deprecated compatibility API problems after upgrading to
4.0.5 from previous versions. |
|
Solution |
Changed code to use TrAX API |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
WebSphere Application Server |
Web Services |
Multi-Platform |
4.0.2, 4.0.3, 4.0.4, 4.0.5 |
Advanced |
|
|
|
|