在tomcat下发布cxf没有问题,在resin2.x下发布出现转换异常

阅读更多
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=: Could not write schema.: com.caucho.xsl.TransformerExceptionWrapper: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to com.caucho.xml.QElement
	at org.apache.cxf.wsdl11.SchemaSerializer.marshall(SchemaSerializer.java:51)
	at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown Source)
	at com.ibm.wsdl.xml.WSDLWriterImpl.printTypes(Unknown Source)
	at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
	at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
	at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
	at org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHandler.java:196)
	... 50 more
Caused by: com.caucho.xsl.TransformerExceptionWrapper: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to com.caucho.xml.QElement
	at com.caucho.xsl.TransformerImpl.transform(TransformerImpl.java:431)
	at com.caucho.xsl.TransformerImpl.transform(TransformerImpl.java:305)
	at org.apache.cxf.wsdl11.SchemaSerializer.writeXml(SchemaSerializer.java:59)
	at org.apache.cxf.wsdl11.SchemaSerializer.marshall(SchemaSerializer.java:49)
	... 56 more
Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot be cast to com.caucho.xml.QElement
	at com.caucho.xsl.XslWriter.pushCopy(XslWriter.java:671)
	at com.caucho.xsl.IdentityStylesheet.applyNode(IdentityStylesheet.java:109)
	at com.caucho.xsl.IdentityStylesheet.transform(IdentityStylesheet.java:87)
	at com.caucho.xsl.TransformerImpl.transform(TransformerImpl.java:421)
	... 59 more

 

在tomcat下发布成功,能看到wsdl内容,这个原因应该是解析xml 时候采用resin的方式 ,com.caucho.xsl.TransformerImpl这个是resin下的,cxf下也有,怎么能让他优先使用cxf下的类呢~!

你可能感兴趣的:(tomcat,resin,cxf,apache,cxf)