If it does work if you put it a separate file, it's probably a bug in SWS. Could you file one at the JIRA?
Thanks,
If it does work if you put it a separate file, it's probably a bug in SWS. Could you file one at the JIRA?
Thanks,
So is it a bug? Is there a solution to get validator working with abstract schema types?
I'm facing the same problem (http://forum.springframework.org/showthread.php?t=42668)
Hi Exgorth.
Yes, it's a bug of the Java validator. I thought they will automatically update to a new xerces version which would solve the problem (i hope).
Arjen described a workaroud in my JIRA report and i use it until now...
Cheers,
Ingo
I've set the system property:
and i'm still getting the same errorsCode:<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <systemProperties> <systemProperty> <name>javax.xml.validation.SchemaFactory</name> <value>org.apache.xerces.jaxp.validation.XMLSchemaFactory</value> </systemProperty> </systemProperties> </configuration> </plugin>
My schema is differs from listed in SWS-35Code:XML validation error on request: UndeclaredPrefix: Cannot resolve 'sch:Flight' as a QName: the prefix 'sch' is not declared. XML validation error on request: cvc-elt.4.1: The value 'sch:Flight' of attribute 'http://www.w3.org/2001/XMLSchema-instance,type' of element 'sch:details' is not a valid QName. XML validation error on request: cvc-type.2: The type definition cannot be abstract for element sch:details. XML validation error on request: UndeclaredPrefix: Cannot resolve 'sch:Flight' as a QName: the prefix 'sch' is not declared. XML validation error on request: cvc-attribute.3: The value 'sch:Flight' of attribute 'xsi:type' on element 'sch:details' is not valid with respect to its type, 'QName'.
in attributeFormDefault="unqualified" instead of attributeFormDefault="qualified"
So why the workaround doesn't works for me?
I hope you also have a version of the original apache-xerces in your classpath? The property alone isn't enough. As far as i know, if the class of the property isn't fount, then Java falls back to the buggy version.I've set the system property:
I've packaged app in .war file and the following jars i have in WEB-INF/lib:
and deployed the .war to the clean apache-tomcat-6.0.13.Code:acegi-security-1.0.3.jar activation-1.1.jar aopalliance-1.0.jar commons-logging-1.1.jar jaxb-api-2.1.jar jaxb-impl-2.1.3.jar log4j-1.2.12.jar mail-1.4.jar oro-2.0.8.jar saaj-api-1.3.jar saaj-impl-1.3.jar spring-aop-2.0.5.jar spring-beans-2.0.5.jar spring-context-2.0.5.jar spring-core-2.0.6.jar spring-dao-2.0.6.jar spring-oxm-1.0-rc3-SNAPSHOT.jar spring-oxm-tiger-1.0-rc3-20070815.014704-28.jar spring-remoting-2.0.5.jar spring-support-2.0.5.jar spring-web-2.0.5.jar spring-webmvc-2.0.5.jar spring-ws-core-1.0-rc3-SNAPSHOT.jar spring-ws-core-tiger-1.0-rc3-20070815.014704-28.jar spring-ws-security-1.0-rc3-20070815.014704-28.jar spring-xml-1.0-rc3-SNAPSHOT.jar stax-api-1.0-2.jar stax-api-1.0.1.jar wsdl4j-1.6.1.jar xalan-2.7.0.jar xercesImpl-2.8.1.jar xml-apis-1.3.03.jar xmldsig-1.0.jar xmlsec-1.3.0.jar xmlsec-2.0.jar xws-security-2.0-FCS.jar
also i've added into the catalina.bat:
to noopCode:set JAVA_OPTS=%JAVA_OPTS% -Djavax.xml.validation.SchemaFactory=org.apache.xerces.jaxp.validation.XMLSchemaFactory![]()
Please read the bug report carefully. The property to set is:
Note the semicolon, and the W3C schema reference after it.Code:javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema
So for tomcat, you would do:
Code:set JAVA_OPTS=%JAVA_OPTS% -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory
Thanx, Arjen and res1st.
It's all validates now!!!
for jetty i've set:
and for tomcat:Code:<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <systemProperties> <systemProperty> <name>javax.xml.validation.SchemaFactory</name> <value>http\://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory</value> </systemProperty> </systemProperties> </configuration> </plugin>
Again, thanx a lot!Code:set JAVA_OPTS=%JAVA_OPTS% -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory
Great!
Note that a slightly better solution for Jetty would be this:
Since the property name is "javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema", after all.Code:<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <systemProperties> <systemProperty> <name>javax.xml.validation.SchemaFactory\:http\://www.w3.org/2001/XMLSchema</name> <value>org.apache.xerces.jaxp.validation.XMLSchemaFactory</value> </systemProperty> </systemProperties> </configuration> </plugin>