[jboss-jira] [JBoss JIRA] (AS7-6390) Problem with jboss versions of xerces and xalan: XML Parsing Error: duplicate attribute in wsdl definitions
David Lloyd (JIRA)
jira-events at lists.jboss.org
Wed Feb 20 09:38:58 EST 2013
[ https://issues.jboss.org/browse/AS7-6390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755426#comment-12755426 ]
David Lloyd commented on AS7-6390:
----------------------------------
[~romanj] sent this to the dev list:
{quote}
Hello everyone,
I can not get heard on irc ;-) and forum discussion in development area seems to be a bit dead.
I would like to start contributing and I have been trying to resolve issue reported here: https://issues.jboss.org/browse/AS7-6390
I came to the point where I figured out that the issue is caused by incorrectly picked TransformerFactory class (it is created as an instance of org.apache.xalan.xsltc.trax.TransformerFactoryImpl instead of com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl).
This instance incorectly performs transormation of wsdl inserting doubled namespace definitions.
As it was reported by user this is not happening in Jboss EAP 6.0
I did some investigation and I found that it is caused by change in the file: https://github.com/jboss/xalan-j/blob/jboss_2_7_1/src/META-INF/services/javax.xml.transform.TransformerFactory
Change labeled: "Enable xslt" commit: 928a986054f4c67fcd0d62fabec908aa77fdd864
This file exist in xalan-2.7.1-jbossorg-1.jar and xalan-2.7.1-redhat-1.jar but in redhat release it is unchanged.
When I revert this change locally - correct class is picked and double namespaces do not occur.
Another consternation about this third party release is that in nexus repository there is released JAR named: xalan-2.7.1-jbossorg-2 while there is no such version on github. It should not be an issue as by default current builds of AS 6,7 and 8 ;-) are picking xalan-2.7.1-jbossorg-1 but it would be nice to have it sorted.
OTOH replacing xalan-2.7.1-jbossorg-1 with xalan-2.7.1-jbossorg-2 does not solve the problem mentioned above.
I am interested to hear your views on the matter.
Kind regards
{quote}
> Problem with jboss versions of xerces and xalan: XML Parsing Error: duplicate attribute in wsdl definitions
> -----------------------------------------------------------------------------------------------------------
>
> Key: AS7-6390
> URL: https://issues.jboss.org/browse/AS7-6390
> Project: Application Server 7
> Issue Type: Bug
> Components: Web Services
> Affects Versions: 7.1.1.Final
> Reporter: Michael Vetter
>
> We are using a feature (SimpleWsdl11Definition) of spring ws (version 1.5.9) to serve wsdl files to the browser or to a client.
> Our wsdl file has custom namespace prefixes like this:
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:bsf="http:/... >
> It works in JBoss 5.1 and eap 6.0.0 but with JBoss 7.1.1 or the current 7.2 snapshot I get the following error when I enter the wsdl URL in the browser:
> XML Parsing Error: duplicate attribute
> Location: http://localhost:8080/sc-webservices/service/loginServiceWS.wsdl
> Line Number 1, Column 671:<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:bsf="http://
> The wsdl served to the browser contains duplicates of the custom namespace prefixes defined in the original wsdl file packaged in a war inside an ear.
> While debugging I only saw classes from jboss versions of xerces and xalan parsing the wsdl and serving the result to the client.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list