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 "Mauro Molinari (JIRA)" <ji...@apache.org> on 2007/10/25 16:44:50 UTC

[jira] Created: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Generated WSDL has validation errors when methods launch exceptions
-------------------------------------------------------------------

                 Key: AXIS2-3301
                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
    Affects Versions: 1.3
            Reporter: Mauro Molinari
            Priority: Critical


Suppose you have the following class:

package test;

public class TestService
{
  public String login(String username, String password) throws MyException, MyException2
  {
    return "ticket";
  }
  
  public void logout(String ticket) throws MyException, MyException2
  {
  }
}

and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.

When running java2wsdl with the following options:
java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService

I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:

src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4

src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8

As suggested by some users in Eclipse WTP newsgroup, I tried the following:
java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService

The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:

src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4

src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4

src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mauro Molinari updated AXIS2-3301:
----------------------------------

    Attachment: wsdl.zip

Generated WSDL files

> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Priority: Critical
>         Attachments: src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Daniel Hiebert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548422 ] 

Daniel Hiebert commented on AXIS2-3301:
---------------------------------------

The above failing WSDL, although apparently working in eclipse's web services explorer generates the following warnings when it first attempts to load the Axis 1.3 WSDL.

IWAB0380E Errors were encountered while validating XML schemas.
XSD: Type reference 'http://converttemp.wsbeans.iseries/xsd#CONVERTTEMPInput' is unresolved
XSD: Type reference 'http://converttemp.wsbeans.iseries/xsd#CONVERTTEMPResult' is unresolved
XSD: Type reference 'http://converttemp.wsbeans.iseries/xsd#CONVERTTEMPInput' is unresolved
IWAB0381I http://lp01ut10.rchland.ibm.com:10070/web/services/ConvertTemp?wsdl was successfully opened.

This appears to be directly related to the regression from Axis 1.1 going up to 1.3.

> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: ConvertTempAxis2 1.1.wsdl, ConvertTempFailing1.3.wsdl, src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Matt Voysey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564071#action_12564071 ] 

Matt Voysey commented on AXIS2-3301:
------------------------------------

I too am being hit by this problem. The issue occurs not just for web method Exception throws, but for any web method that uses a return type or argument type from a different package than the service class. The resulting wsdl generated contains multiple <xs:schema> tags for the types, each having a separate namespace according to the source package of the java types. It does not however contain the necessary <xs:import namespace="..."/> tags to make those types visible to eachother, hence the "components from this namespace are not referenceable" errors from the validators (I consistently get these errors when trying to generate web service clients from the wsdl using Eclipse, Netbeans and Visual Studio). This is invalid wsdl and should be fixed.

However I have also done some experimenting: It is possible to manually add the import tags to "fix" the generated wsdl so that it validates. However in my recent experience the current tools still fail to generate a working client that consumes the webservice: for example using the wsdl2java tool produces a client that fails at runtime with ADB parsing errors - in other words axis is unable to consume the web service it has created. Visual Studio similarly fails to generate a client for the webservice. 

The only success I have had is to move all of the types into the same java package (eg. com.foo.ws) and ALSO override the wsdl schema namespace in services.xml using <schema schemaNamespace="http://ws.foo.com/xsd"/>. This way the wsdl ends up with both the web service operations and the types it uses inside the same namespace and hence there is only one <schema> in the wsdl - and this then works with most client generation tools.

Has anybody had any success with clients where the wsdl contains multiple type schema namespaces?

> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: ConvertTempAxis2 1.1.wsdl, ConvertTempFailing1.3.wsdl, src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "nadir amra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548109 ] 

nadir amra commented on AXIS2-3301:
-----------------------------------

I think this is a major problem so it needs some focus since tools like eclipse indicate that the generated the WSDL is not valid and affects the generation of client stub code. So here are the various artifacts to recreate (we are using Axis 1.3):

A POJO, ConvertTemp3Services() is deployed that returns an object of type CONVERTTEMPResult .  The java classes are very simple: 

===================================
package iseries.wsbeans.converttemp3;

public class ConvertTemp3Services
{
    public ConvertTemp3Services()
    {
        super();
    }

    public CONVERTTEMPResult converttemp()
    {
        CONVERTTEMPResult resultData = new CONVERTTEMPResult();
        resultData.set_TEMPOUT("99");
        return resultData;
    }
}
==============================
package iseries.wsbeans.converttemp3;

import java.io.Serializable;

public class CONVERTTEMPResult implements Serializable
{
    private static final long serialVersionUID = -6046540633483862560L;
    private String TEMPOUT = "";

    public CONVERTTEMPResult()  { super(); }
    public void set_TEMPOUT(String value) { TEMPOUT = value; }
    public String get_TEMPOUT() { return TEMPOUT; }
}
===============================

The services.xml file is as follows:

===============================
<?xml version="1.0" encoding="UTF-8"?>
<service activate="true" name="ConvertTemp3" scope="application">
    <description/>
    <messageReceivers>
        <messageReceiver
            class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" mep="http://www.w3.org/2004/08/wsdl/in-only"/>
        <messageReceiver
            class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" mep="http://www.w3.org/2004/08/wsdl/in-out"/>
    </messageReceivers>
    <parameter name="ServiceClass">iseries.wsbeans.converttemp3.ConvertTemp3Services</parameter>
    <parameter name="useOriginalwsdl">false</parameter>
    <operation name="converttemp"/>
    <excludeOperations/>
</service>
===============================

The Axis 3 automatically generates the following WSDL:

===============================
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:ns1="http://converttemp3.wsbeans.iseries/xsd"
	xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
	xmlns:ns0="http://converttemp3.wsbeans.iseries"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
	targetNamespace="http://converttemp3.wsbeans.iseries">
	<wsdl:documentation>ConvertTemp3</wsdl:documentation>
	<wsdl:types>
		<xs:schema xmlns:ns="http://converttemp3.wsbeans.iseries"
			attributeFormDefault="qualified" elementFormDefault="qualified"
			targetNamespace="http://converttemp3.wsbeans.iseries">
			<xs:element name="converttempResponse">
				<xs:complexType>
					<xs:sequence>
						<xs:element minOccurs="0" name="return"
							nillable="true" type="ns1:CONVERTTEMPResult" />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:schema>
		<xs:schema xmlns:ax22="http://converttemp3.wsbeans.iseries/xsd"
			attributeFormDefault="qualified" elementFormDefault="qualified"
			targetNamespace="http://converttemp3.wsbeans.iseries/xsd">
			<xs:complexType name="CONVERTTEMPResult">
				<xs:sequence>
					<xs:element minOccurs="0" name="_TEMPOUT"
						nillable="true" type="xs:string" />
				</xs:sequence>
			</xs:complexType>
		</xs:schema>
	</wsdl:types>
	<wsdl:message name="converttempRequest" />
	<wsdl:message name="converttempResponse">
		<wsdl:part name="parameters" element="ns0:converttempResponse" />
	</wsdl:message>
	<wsdl:portType name="ConvertTemp3PortType">
		<wsdl:operation name="converttemp">
			<wsdl:input message="ns0:converttempRequest"
				wsaw:Action="urn:converttemp" />
			<wsdl:output message="ns0:converttempResponse"
				wsaw:Action="urn:converttempResponse" />
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="ConvertTemp3SOAP11Binding"
		type="ns0:ConvertTemp3PortType">
		<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
			style="document" />
		<wsdl:operation name="converttemp">
			<soap:operation soapAction="urn:converttemp"
				style="document" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="ConvertTemp3">
		<wsdl:port name="ConvertTemp3SOAP11port_http"
			binding="ns0:ConvertTemp3SOAP11Binding">
			<soap:address
				location="http://lp01ut10.rchland.ibm.com:10010/web/services/ConvertTemp3" />
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>

===========================

The problem is the namespace ns1  in "ns1:CONVERTTEMPResult" in the "converttempResponse" element. Bascially the WSDL validator in eclipse indicates the following errors:

       IWAB0380E Errors were encountered while validating XML schemas.
       XSD: Type reference 'http://converttemp3.wsbeans.iseries/xsd#CONVERTTEMPResult' is unresolved

In axis 1.1 (not sure about 1.2), everything use to be in 1 schema.  Not sure why this was changed.  Please fix or give me some clues on where I should take a look and I can fix.  Thanks.

 


> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-3301:
----------------------------------------

    Assignee: Deepal Jayasinghe

> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Daniel Hiebert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Hiebert updated AXIS2-3301:
----------------------------------

    Attachment: ConvertTempFailing1.3.wsdl
                ConvertTempAxis2 1.1.wsdl

> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: ConvertTempAxis2 1.1.wsdl, ConvertTempFailing1.3.wsdl, src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Daniel Hiebert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548309 ] 

Daniel Hiebert commented on AXIS2-3301:
---------------------------------------

The problem noted above is an apparent problem for the WSDL generated in Axis 1.1 to Axis 1.3.  This appears to be a type of regression bug in Axis 1.3.  The WSDL validator  now fails on Eclipse 3.*, when the WSDL imported into J2EE view.

I will attach the working and failing versions.




> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Assignee: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: src.zip, wsdl.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3301) Generated WSDL has validation errors when methods launch exceptions

Posted by "Mauro Molinari (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mauro Molinari updated AXIS2-3301:
----------------------------------

    Attachment: src.zip

Java source files

> Generated WSDL has validation errors when methods launch exceptions
> -------------------------------------------------------------------
>
>                 Key: AXIS2-3301
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3301
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 1.3
>            Reporter: Mauro Molinari
>            Priority: Critical
>         Attachments: src.zip
>
>
> Suppose you have the following class:
> package test;
> public class TestService
> {
>   public String login(String username, String password) throws MyException, MyException2
>   {
>     return "ticket";
>   }
>   
>   public void logout(String ticket) throws MyException, MyException2
>   {
>   }
> }
> and two simple extensions of java.lang.Exception called test.MyException and test.MyException2.
> When running java2wsdl with the following options:
> java2wsdl -o <output-path> -of TestService.wsdl -cp <classpah> -cn test.TestService
> I get a WSDL (attached as TestService.wsdl) for which Eclipse gives two validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService.wsdl'.	TestService.wsdl	line 8
> As suggested by some users in Eclipse WTP newsgroup, I tried the following:
> java2wsdl -o <output-path> -of TestService_Exception.wsdl -cp <classpah> -xc java.lang.Exception -cn test.TestService
> The result is a WSDL (attached as TestService_Exception.wsdl) for which Eclipse gives three validation errors:
> src-resolve.4.2: Error resolving component 'ns1:Exception'. It was detected that 'ns1:Exception' is in namespace 'http://test', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns1:Exception' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'xs:Throwable'. It was detected that 'xs:Throwable' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'xs:Throwable' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 4
> src-resolve.4.2: Error resolving component 'ns0:MyException'. It was detected that 'ns0:MyException' is in namespace 'http://test/xsd', but components from this namespace are not referenceable from schema document 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ns0:MyException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Documents%20and%20Settings/mauro/Documenti/Eclipse33%20workspace/Problema%20Axis2/TestService_Exception.wsdl'.	TestService_Exception.wsdl	line 8

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org