The following change to XmlSchema.jar and subsequent changes to the same
file include org.w3c.dom.Document.getInputEncoding() and
getXmlEncoding() references.
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/
commons/schema/utils/DOMUtil.java 2007/10/22 20:14:12 587229
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/
commons/schema/XmlSchemaCollection.java 2007/10/22 20:14:12 587229
This functions do not exist in jdk1.4's rt.jar (i am using 1.4.2_12).
These function's inclusion breaks wsdl2java in basic cases including
some samples using jdk1.4.
Here is the exact stacktrace:
c:\axis2-SNAPSHOT\samples\quickstartadb>ant
Buildfile: build.xml
generate.service:
[delete] Deleting directory
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build\service
[mkdir] Created dir:
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build\service
[mkdir] Created dir:
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build\service\classes
[java] Retrieving document at
'./resources/META-INF/StockQuoteService.wsdl'.
[java] java.lang.NoSuchMethodError:
org.w3c.dom.Document.getXmlEncoding()Ljava/lang/String;
[java] at
org.apache.ws.commons.schema.utils.DOMUtil.getXmlEncoding(DOMUtil.java:6
04)
[java] at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollectio
n.java:388)
[java] at
org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLT
oAxisServiceBuilder.java:140)
[java] at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleEl
ements(WSDL11ToAxisServiceBuilder.java:2225)
[java] at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSD
L11ToAxisServiceBuilder.java:384)
[java] at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSD
L11ToAxisServiceBuilder.java:373)
[java] at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(
WSDL11ToAxisServiceBuilder.java:321)
[java] at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllS
ervices(WSDL11ToAllAxisServicesBuilder.java:109)
[java] at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGeneration
Engine.java:154)
[java] at
org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
[java] at
org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
[java] Exception in thread "main"
[java] Java Result: 1
[copy] Copying 1 file to
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build\service\src\samples\
quickstart\service\adb
[copy] Copying 1 file to
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build\service\resources
BUILD FAILED
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build.xml:76: The
following error occurred while executing this line:
java.io.FileNotFoundException:
C:\tools\axis2-SNAPSHOT\samples\quickstartadb\build\service\build.xml
(The system cannot find the file specified)
Total time: 1 second
I get similar errors for other wsdl2java runs with the same error except
with the method getInputEncoding() referenced.
Thanks,
Nadeem