[ http://issues.apache.org/jira/browse/AXIS2-67?page=all ]
Chathura Herath closed AXIS2-67:
--------------------------------
Resolution: Fixed
A validator is added to the WSDL code generation Engine that will check for the
possible malformed WSDL that may be pointed to by the user. This validator will
throw an exception that is of more use to the user to fix the error
Eventually. Fix is available from Completed: At revision: 209579
> Throw a Error message if the WSDL schema does not contain a targetnamespace
> ---------------------------------------------------------------------------
>
> Key: AXIS2-67
> URL: http://issues.apache.org/jira/browse/AXIS2-67
> Project: Apache Axis 2.0 (Axis2)
> Type: Improvement
> Components: wsdl
> Environment: NA
> Reporter: Chathura Herath
> Assignee: Chathura Herath
> Priority: Minor
>
> In WSDL2JAVA or WSDL2CODE in AXIS2 if the user gives a wsdl that does not
> contain a targetnamespace in the schema then it goes untill the xml-beans
> extension to identify the error and throws an error with the stack trace
> given below. It was agreed in the list to throw a error much earlier
> pointing out the specific error rather than letting it go to xml beans to get
> confused. Following is the stacktrace provided by Kador
> D:\data\eclipse\WSDL Test>java org.apache.axis2.wsdl.WSDL2Java -o axis2 -ss
> true -sd true -uri test.wsdl Exception in thread "main"
> java.lang.RuntimeException:
> org.apache.xmlbeans.XmlException: error: src-resolve.a: Could not find type
> '[EMAIL PROTECTED]://test.wsdl'. Do you mean to refer to the type named
> testType?
> at
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBean
> sExtension.java:103)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
> onEngine.java:79)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)
> Caused by: org.apache.xmlbeans.XmlException: error: src-resolve.a: Could not
> find type '[EMAIL PROTECTED]://test.wsdl'. Do y ou mean to refer to the type
> named testType?
> at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaT
> ypeSystemCompiler.java:225)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:641)
> at
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBean
> sExtension.java:69)
> ... 3 more
--
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