Adding Xalan to classpath of my working spring-ws application seems to break my XML stack.
I'm using spring-ws 1.0.0 (and Java 1.5.0_06, JDOM 1.0, SAAJ 1.3), however even when I upgrade to spring-ws 1.5.0 and use all the libraries that come with it the problem persists.
I need Xalan completely unrelated to spring-ws, and if I add it to classpath it works, but spring-ws can't create single XML message.
Is anyone using Xalan 2.7.0 and spring-ws together? Does anyone have any theories where the conflict is?
This is the exception I get:
org.springframework.ws.client.WebServiceTransforme rException: Transformation error: org.jdom.JDOMException: Exception in startElement: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.; nested exception is javax.xml.transform.TransformerException: org.jdom.JDOMException: Exception in startElement: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
Caused by:
javax.xml.transform.TransformerException: org.jdom.JDOMException: Exception in startElement: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:501)
at org.springframework.ws.client.core.WebServiceTempl ate$4.doWithMessage(WebServiceTemplate.java:352)
at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:395)
at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:350)
at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:296)
...
---------
org.jdom.JDOMException: Exception in startElement: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at org.jdom.output.SAXOutputter.startElement(SAXOutpu tter.java:1028)
at org.jdom.output.SAXOutputter.element(SAXOutputter. java:894)
at org.jdom.output.SAXOutputter.elementContent(SAXOut putter.java:1093)
at org.jdom.output.SAXOutputter.elementContent(SAXOut putter.java:1067)
at org.jdom.output.SAXOutputter.output(SAXOutputter.j ava:666)
at org.jdom.transform.JDOMSource$DocumentReader.parse (JDOMSource.java:479)
at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
at org.springframework.ws.client.core.WebServiceTempl ate$4.doWithMessage(WebServiceTemplate.java:352)
at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:395)
at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:350)
at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:296)
Caused by: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at org.apache.xml.utils.DOMBuilder.startElement(DOMBu ilder.java:374)
at org.apache.xalan.transformer.TransformerIdentityIm pl.startElement(TransformerIdentityImpl.java:1072)
at org.jdom.output.SAXOutputter.startElement(SAXOutpu tter.java:1025)
... 44 more
Caused by:
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at org.apache.xml.utils.DOMBuilder.startElement(DOMBu ilder.java:374)
at org.apache.xalan.transformer.TransformerIdentityIm pl.startElement(TransformerIdentityImpl.java:1072)
at org.jdom.output.SAXOutputter.startElement(SAXOutpu tter.java:1025)
at org.jdom.output.SAXOutputter.element(SAXOutputter. java:894)
at org.jdom.output.SAXOutputter.elementContent(SAXOut putter.java:1093)
at org.jdom.output.SAXOutputter.elementContent(SAXOut putter.java:1067)
at org.jdom.output.SAXOutputter.output(SAXOutputter.j ava:666)
at org.jdom.transform.JDOMSource$DocumentReader.parse (JDOMSource.java:479)
at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
at org.springframework.ws.client.core.WebServiceTempl ate$4.doWithMessage(WebServiceTemplate.java:352)
at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:395)
at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:350)
at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:296)
...
Caused by:
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at com.sun.org.apache.xerces.internal.dom.CoreDocumen tImpl.checkNamespaceWF(CoreDocumentImpl.java:2388)
at com.sun.org.apache.xerces.internal.dom.AttrNSImpl. setName(AttrNSImpl.java:126)
at com.sun.org.apache.xerces.internal.dom.AttrNSImpl. <init>(AttrNSImpl.java:111)
at com.sun.org.apache.xerces.internal.dom.CoreDocumen tImpl.createAttributeNS(CoreDocumentImpl.java:2012 )
at com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl.c reateAttributeNS(SOAPDocumentImpl.java:161)
at com.sun.org.apache.xerces.internal.dom.ElementImpl .setAttributeNS(ElementImpl.java:684)
at com.sun.xml.messaging.saaj.soap.impl.ElementImpl.s etAttributeNS(ElementImpl.java:1213)
at org.apache.xml.utils.DOMBuilder.startElement(DOMBu ilder.java:359)
at org.apache.xalan.transformer.TransformerIdentityIm pl.startElement(TransformerIdentityImpl.java:1072)
at org.jdom.output.SAXOutputter.startElement(SAXOutpu tter.java:1025)
at org.jdom.output.SAXOutputter.element(SAXOutputter. java:894)
at org.jdom.output.SAXOutputter.elementContent(SAXOut putter.java:1093)
at org.jdom.output.SAXOutputter.elementContent(SAXOut putter.java:1067)
at org.jdom.output.SAXOutputter.output(SAXOutputter.j ava:666)
at org.jdom.transform.JDOMSource$DocumentReader.parse (JDOMSource.java:479)
at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
at org.springframework.ws.client.core.WebServiceTempl ate$4.doWithMessage(WebServiceTemplate.java:352)
at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:395)
at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:350)
at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:296)
...


Reply With Quote


