You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Chathura Herath (JIRA)" <ji...@apache.org> on 2005/07/07 05:21:10 UTC

[jira] Created: (AXIS2-67) Throw a Error message if the WSDL schema does not contain a targetnamespace

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
 Assigned to: 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 'testType@http://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 'testType@http://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


[jira] Resolved: (AXIS2-67) Throw a Error message if the WSDL schema does not contain a targetnamespace

Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-67?page=all ]
     
Ajith Harshana Ranabahu resolved AXIS2-67:
------------------------------------------

    Fix Version: 0.92
     Resolution: Fixed
      Assign To: Ajith Harshana Ranabahu  (was: Chathura Herath)

Done. Now the tns checking happens with the mentioned exceptions. The mailing list discussion is at http://marc.theaimsgroup.com/?t=112488540900003&r=1&w=2

> 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: Ajith Harshana Ranabahu
>     Priority: Minor
>      Fix For: 0.92

>
> 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 'testType@http://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 'testType@http://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


[jira] Closed: (AXIS2-67) Throw a Error message if the WSDL schema does not contain a targetnamespace

Posted by "Chathura Herath (JIRA)" <ji...@apache.org>.
     [ 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 'testType@http://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 'testType@http://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


[jira] Reopened: (AXIS2-67) Throw a Error message if the WSDL schema does not contain a targetnamespace

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-67?page=all ]
     
Davanum Srinivas reopened AXIS2-67:
-----------------------------------


BUT: the following is a valid wsdl with valid schema:

<wsdl:types>
     <xsd:schema>
       <xsd:import
         namespace="http://docs.oasis-open.org/wsrf/rp-1" 
         schemaLocation="
http://docs.oasis-open.org/wsrf/rp-1" />
     </xsd:schema>
   </wsdl:types>


> 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 'testType@http://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 'testType@http://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