XFire

Attribute "xsd" bound to namespace "http://www.w3.org/2000/xmlns/" was already specified for element "xsd:element".

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Won't Fix
  • Affects Version/s: 1.2, 1.2.1
  • Fix Version/s: 1.2.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    xmlbeans 2.2, java 1.42
  • Number of attachments :
    1

Description

The WSDL generated is invalid - it contains duplicate xsd declarations. An example:

<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="searchResponse" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Activity

Hide
Dan Diephouse added a comment -

Can you let me know which version of xerces you may or may not have on the classpath?

Show
Dan Diephouse added a comment - Can you let me know which version of xerces you may or may not have on the classpath?
Hide
Dan Diephouse added a comment -

And also which verison of woodstox?

Show
Dan Diephouse added a comment - And also which verison of woodstox?
Hide
Jakub Mendys added a comment -

I cannot find xerces on my classpath (but I cannot guarantee it is not hidded somewhere in WebLogic jars).
I do have woodstox v 2.9.3 on my classpath.

Complete list of jars for the application is as follow (standard Weblogic 8.1 SP3 jars not listed here):
commons-logging/commons-logging-1.0.4.jar
commons-validator/commons-validator-1.1.4.jar
commons-beanutils/commons-beanutils-1.7.0.jar
commons-digester/commons-digester-1.5.0.jar
commons-collections/commons-collections-3.1.0.jar
commons-dbcp/commons-dbcp-1.2.1.jar
commons-pool/commons-pool-1.3.jar
commons-fileupload/commons-fileupload-1.0.jar
commons-lang/commons-lang-2.0.0.jar
struts/struts-1.2.7.jar
log4j/log4j-1.2.8.jar
asm/asm-1.5.3.jar
dom4j/dom4j-1.6.1.jar
hibernate/hibernate-3.1.3.jar
ehcache/ehcache-1.1.jar
cglib/cglib-2.1.3.jar
antrl/antlr-2.7.6rc1.jar
xmlbean/xbean-2.2.0.jar
jaxen/jaxen-1.1-beta-9.jar
xfire/xfire-all-1.1.2.jar
spring/spring-1.2.8.jar
xbean/xbean-spring-2.5.jar
stax/stax-api-1.0.1.jar
activation/activation-1.1.jar
wsdl4j/wsdl4j-1.5.2.jar
woodstox/wstx-asl-2.9.3.jar
jdom/jdom-1.0.jar

Show
Jakub Mendys added a comment - I cannot find xerces on my classpath (but I cannot guarantee it is not hidded somewhere in WebLogic jars). I do have woodstox v 2.9.3 on my classpath. Complete list of jars for the application is as follow (standard Weblogic 8.1 SP3 jars not listed here): commons-logging/commons-logging-1.0.4.jar commons-validator/commons-validator-1.1.4.jar commons-beanutils/commons-beanutils-1.7.0.jar commons-digester/commons-digester-1.5.0.jar commons-collections/commons-collections-3.1.0.jar commons-dbcp/commons-dbcp-1.2.1.jar commons-pool/commons-pool-1.3.jar commons-fileupload/commons-fileupload-1.0.jar commons-lang/commons-lang-2.0.0.jar struts/struts-1.2.7.jar log4j/log4j-1.2.8.jar asm/asm-1.5.3.jar dom4j/dom4j-1.6.1.jar hibernate/hibernate-3.1.3.jar ehcache/ehcache-1.1.jar cglib/cglib-2.1.3.jar antrl/antlr-2.7.6rc1.jar xmlbean/xbean-2.2.0.jar jaxen/jaxen-1.1-beta-9.jar xfire/xfire-all-1.1.2.jar spring/spring-1.2.8.jar xbean/xbean-spring-2.5.jar stax/stax-api-1.0.1.jar activation/activation-1.1.jar wsdl4j/wsdl4j-1.5.2.jar woodstox/wstx-asl-2.9.3.jar jdom/jdom-1.0.jar
Hide
Dan Diephouse added a comment -

Thanks. This issue is driving me insane. I have that exact environment set up but can't reproduce it.

Any chance you could try running this out of weblogic? or could you let me know what jars weblogic has on the classpath? I'm not a classpath expert by any means.

Show
Dan Diephouse added a comment - Thanks. This issue is driving me insane. I have that exact environment set up but can't reproduce it. Any chance you could try running this out of weblogic? or could you let me know what jars weblogic has on the classpath? I'm not a classpath expert by any means.
Hide
Dan Diephouse added a comment -

Err I meant to say: I'm not a weblogic expert by any means.

Show
Dan Diephouse added a comment - Err I meant to say: I'm not a weblogic expert by any means.
Hide
Jakub Mendys added a comment -

I tried this on tomcat and still get the same problem. The test case is provided:

See test case:
===========================
Under link http://jmendys.com/test.zip you will find a test case to reproduce this problem.

----------------------------------------------------------------------------------------------------------
NOTE!!! Zip contains xfire all 1.1.2 jar with that needs to be replaced with 1.2.1
----------------------------------------------------------------------------------------------------------

The zip contains folder 'test' which is an exploded war ready to deploy. After
deployment is exposes 2 services:

  • XFireTestService1 (without xmlbean bidings)
  • XFireTestService2 (with xmlbean bindings)

When you request for WSDL for the second you get invalid xml document but for the first one this seems to work ok.

XMLBeans problem again ?

Show
Jakub Mendys added a comment - I tried this on tomcat and still get the same problem. The test case is provided: See test case: =========================== Under link http://jmendys.com/test.zip you will find a test case to reproduce this problem. ---------------------------------------------------------------------------------------------------------- NOTE!!! Zip contains xfire all 1.1.2 jar with that needs to be replaced with 1.2.1 ---------------------------------------------------------------------------------------------------------- The zip contains folder 'test' which is an exploded war ready to deploy. After deployment is exposes 2 services:
  • XFireTestService1 (without xmlbean bidings)
  • XFireTestService2 (with xmlbean bindings)
When you request for WSDL for the second you get invalid xml document but for the first one this seems to work ok. XMLBeans problem again ?
Hide
Dan Diephouse added a comment -

OK, maybe this is an xmlbeans issue. I'll have to investigate. Thanks for the test case.

Show
Dan Diephouse added a comment - OK, maybe this is an xmlbeans issue. I'll have to investigate. Thanks for the test case.
Hide
Jakub Mendys added a comment -

test case (maven build)

Show
Jakub Mendys added a comment - test case (maven build)
Hide
Jakub Mendys added a comment -

original test case has been relaced with maven project (attached)

Show
Jakub Mendys added a comment - original test case has been relaced with maven project (attached)
Hide
Dan Diephouse added a comment -

Awesome! Thanks for the test case. I'll be checking this out later today.

Show
Dan Diephouse added a comment - Awesome! Thanks for the test case. I'll be checking this out later today.
Hide
Dan Diephouse added a comment -

Alright, thanks to this test case I have it reproduced now. Working on fixing...

Show
Dan Diephouse added a comment - Alright, thanks to this test case I have it reproduced now. Working on fixing...
Hide
Dan Diephouse added a comment -

Turns out this is a bug in WSDL4J. To fix, simply drop in a new version of WSDL4J. I've uploaded one here for convenience:

http://envoisolutions.com/~dan/wsdl4j-1.6.jar

Show
Dan Diephouse added a comment - Turns out this is a bug in WSDL4J. To fix, simply drop in a new version of WSDL4J. I've uploaded one here for convenience: http://envoisolutions.com/~dan/wsdl4j-1.6.jar
Hide
Dan Diephouse added a comment -

OK, I wrote a custom serializer for WSDL4J and things seem to be working fine. If you use a normal WSDL4J and this build, things should work:

http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20061002.035146-25.jar

Show
Dan Diephouse added a comment - OK, I wrote a custom serializer for WSDL4J and things seem to be working fine. If you use a normal WSDL4J and this build, things should work: http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20061002.035146-25.jar

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: