[ http://issues.apache.org/jira/browse/AXIS2-337?page=all ]
Nathaniel Auvil updated AXIS2-337:
----------------------------------
Attachment: xml.zip
here are the files.
> org.apache.axis2.tool.ant.AntCodegenTask failing on wsdl:types schema import
> ----------------------------------------------------------------------------
>
> Key: AXIS2-337
> URL: http://issues.apache.org/jira/browse/AXIS2-337
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Components: Tools
> Versions: 0.93
> Environment: windows xp, jdk 1.4.2
> Reporter: Nathaniel Auvil
> Attachments: xml.zip
>
> trying to generate code from wsdl file used sucessfully in axis 1.2.1 My
> wsdl:types element contains imports of other schemas, such as:
> <wsdl:types>
> <xs:schema>
> <xs:import namespace="http://www.mycompany.com/types"
> schemaLocation="someTypes.xsd"/>
> <xs:import
> namespace="http://www.mycompany.com/async/types/intf"
> schemaLocation="someInterfaces.xsd"/>
> </xs:schema>
> </wsdl:types>
> The error i am getting is that it is saying i do not declare a
> targetNamespace for those. I have double checked the imported files and they
> do include a targetNamespace attribute and they work in the wsdl2java in axis
> 1.2.1 without error.
> here is what i get when i execute Ant with the -v option:
> ...
> -wsdl2java:
> Property ${dir.temp} has not been set
> [codegen] path is C:\dev\cpe-async\ant\${dir.temp}
> [codegen] Retrieving document at 'asyncAbstract.wsdl', relative to
> 'file:/C:/dev/cpe-async/ant/../src/xml/'.
> [codegen] Retrieving schema at 'asyncInterfaces.xsd', relative to
> 'file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl'.
> [codegen] Retrieving schema at 'asyncTypes.xsd', relative to
> 'file:/C:/dev/cpe-async/src/xml/asyncInterfaces.xsd'.
> [codegen] Retrieving schema at 'ssml.xsd', relative to
> 'file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl'.
> [antcall] Exiting C:\dev\cpe-async\ant\build-axis2.xml.
> [ant] Exiting C:\dev\cpe-async\ant\build-axis2.xml.
> BUILD FAILED
> C:\dev\cpe-async\ant\build.xml:54: The following error occurred while
> executing this line:
> C:\dev\cpe-async\ant\build-axis2.xml:145: The following error occurred while
> executing this line:
> C:\dev\cpe-async\ant\build-axis2.xml:40:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:388)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> at org.apache.tools.ant.Main.runBuild(Main.java:673)
> at org.apache.tools.ant.Main.startAnt(Main.java:188)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: C:\dev\cpe-async\ant\build-axis2.xml:145: The following error
> occurred while executing this line:
> C:\dev\cpe-async\ant\build-axis2.xml:40:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:388)
> at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> ... 10 more
> Caused by: C:\dev\cpe-async\ant\build-axis2.xml:40:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:180)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> ... 17 more
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:105)
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:178)
> ... 23 more
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid
> WSDL: The WSDL Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:73)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:76)
> ... 24 more
> --- Nested Exception ---
> C:\dev\cpe-async\ant\build-axis2.xml:145: The following error occurred while
> executing this line:
> C:\dev\cpe-async\ant\build-axis2.xml:40:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:388)
> at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> at org.apache.tools.ant.Main.runBuild(Main.java:673)
> at org.apache.tools.ant.Main.startAnt(Main.java:188)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: C:\dev\cpe-async\ant\build-axis2.xml:40:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:180)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> ... 17 more
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:105)
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:178)
> ... 23 more
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid
> WSDL: The WSDL Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:73)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:76)
> ... 24 more
> --- Nested Exception ---
> C:\dev\cpe-async\ant\build-axis2.xml:40:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:180)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> at org.apache.tools.ant.Main.runBuild(Main.java:673)
> at org.apache.tools.ant.Main.startAnt(Main.java:188)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:105)
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:178)
> ... 23 more
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid
> WSDL: The WSDL Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:73)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:76)
> ... 24 more
> --- Nested Exception ---
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL: The WSDL
> Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:105)
> at
> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:178)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:106)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> at org.apache.tools.ant.Task.perform(Task.java:364)
> at org.apache.tools.ant.Target.execute(Target.java:341)
> at org.apache.tools.ant.Target.performTasks(Target.java:369)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> at org.apache.tools.ant.Main.runBuild(Main.java:673)
> at org.apache.tools.ant.Main.startAnt(Main.java:188)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid
> WSDL: The WSDL Types Schema does not define a targetNamespace in
> file:/C:/dev/cpe-async/src/xml/asyncAbstract.wsdl
> at
> org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:73)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:76)
> ... 24 more
> Total time: 1 second
> C:\dev\cpe-async\ant>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira