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 "Sergio Bossa (JIRA)" <ax...@ws.apache.org> on 2005/04/28 11:10:25 UTC

[jira] Created: (AXIS-1963) WSDL2JAVA problems with custom exceptions

WSDL2JAVA problems with custom exceptions
-----------------------------------------

         Key: AXIS-1963
         URL: http://issues.apache.org/jira/browse/AXIS-1963
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2RC2, 1.2RC3    
 Environment: Linux
    Reporter: Sergio Bossa


I have a custom exception coded as follows:

public class MySOAPFault extends AxisFault
{
    public static final String ERROR="Error.1";
    
    public MySOAPFault(String code, String message)
    {
        super(message);
        
        setFaultCodeAsString(code);
    }
}

And this is its WSDL mapping:

<element name="MySOAPFault">
   <complexType>
    <sequence/>
   </complexType>
</element> 

...

<wsdl:message name="MySOAPFault">
      <wsdl:part element="tns:MySOAPFault" name="fault"/>
</wsdl:message>

...

When I run WSDL2JAVA over my WSDL, I get a class named MySOAPFault_Element (not MySOAPFault, as it should be), leading to compile time errors.
However, all works fine if I use Axis API directly, or if I use other languages: the custom exception is correctly thrown and deserialized.

-- 
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] Updated: (AXIS-1963) WSDL2JAVA problems with custom exceptions

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1963?page=all ]

Davanum Srinivas updated AXIS-1963:
-----------------------------------

    Attachment: LocalXQueryService.wsdl

Please see the attached WSDL...compiles fine for me. At this point i'd rather tweak the WSDL to get what's needed rather than fix the code. The problem is because of the anonymous complexType AND using the same name in multiple places (have some problem resolving clases).

-- dims

> WSDL2JAVA problems with custom exceptions
> -----------------------------------------
>
>          Key: AXIS-1963
>          URL: http://issues.apache.org/jira/browse/AXIS-1963
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC2, 1.2RC3
>  Environment: Linux
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl, LocalXQueryService.wsdl
>
> I have a custom exception coded as follows:
> public class MySOAPFault extends AxisFault
> {
>     public static final String ERROR="Error.1";
>     
>     public MySOAPFault(String code, String message)
>     {
>         super(message);
>         
>         setFaultCodeAsString(code);
>     }
> }
> And this is its WSDL mapping:
> <element name="MySOAPFault">
>    <complexType>
>     <sequence/>
>    </complexType>
> </element> 
> ...
> <wsdl:message name="MySOAPFault">
>       <wsdl:part element="tns:MySOAPFault" name="fault"/>
> </wsdl:message>
> ...
> When I run WSDL2JAVA over my WSDL, I get a class named MySOAPFault_Element (not MySOAPFault, as it should be), leading to compile time errors.
> However, all works fine if I use Axis API directly, or if I use other languages: the custom exception is correctly thrown and deserialized.

-- 
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] Commented: (AXIS-1963) WSDL2JAVA problems with custom exceptions

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1963?page=comments#action_64123 ]
     
Davanum Srinivas commented on AXIS-1963:
----------------------------------------

please upload your WSDL

thanks,
dims

> WSDL2JAVA problems with custom exceptions
> -----------------------------------------
>
>          Key: AXIS-1963
>          URL: http://issues.apache.org/jira/browse/AXIS-1963
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC2, 1.2RC3
>  Environment: Linux
>     Reporter: Sergio Bossa

>
> I have a custom exception coded as follows:
> public class MySOAPFault extends AxisFault
> {
>     public static final String ERROR="Error.1";
>     
>     public MySOAPFault(String code, String message)
>     {
>         super(message);
>         
>         setFaultCodeAsString(code);
>     }
> }
> And this is its WSDL mapping:
> <element name="MySOAPFault">
>    <complexType>
>     <sequence/>
>    </complexType>
> </element> 
> ...
> <wsdl:message name="MySOAPFault">
>       <wsdl:part element="tns:MySOAPFault" name="fault"/>
> </wsdl:message>
> ...
> When I run WSDL2JAVA over my WSDL, I get a class named MySOAPFault_Element (not MySOAPFault, as it should be), leading to compile time errors.
> However, all works fine if I use Axis API directly, or if I use other languages: the custom exception is correctly thrown and deserialized.

-- 
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] Commented: (AXIS-1963) WSDL2JAVA problems with custom exceptions

Posted by "Sergio Bossa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1963?page=comments#action_64164 ]
     
Sergio Bossa commented on AXIS-1963:
------------------------------------

Ok dims, I've tweaked my WSDL as you suggested, and now all works fine.
Yes, it should be fine to have the code fixed, but sure there are more serious bug around waiting to be fixed...
So, you can close this bug report.

Thanks.

Sergio B.

> WSDL2JAVA problems with custom exceptions
> -----------------------------------------
>
>          Key: AXIS-1963
>          URL: http://issues.apache.org/jira/browse/AXIS-1963
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC2, 1.2RC3
>  Environment: Linux
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl, LocalXQueryService.wsdl
>
> I have a custom exception coded as follows:
> public class MySOAPFault extends AxisFault
> {
>     public static final String ERROR="Error.1";
>     
>     public MySOAPFault(String code, String message)
>     {
>         super(message);
>         
>         setFaultCodeAsString(code);
>     }
> }
> And this is its WSDL mapping:
> <element name="MySOAPFault">
>    <complexType>
>     <sequence/>
>    </complexType>
> </element> 
> ...
> <wsdl:message name="MySOAPFault">
>       <wsdl:part element="tns:MySOAPFault" name="fault"/>
> </wsdl:message>
> ...
> When I run WSDL2JAVA over my WSDL, I get a class named MySOAPFault_Element (not MySOAPFault, as it should be), leading to compile time errors.
> However, all works fine if I use Axis API directly, or if I use other languages: the custom exception is correctly thrown and deserialized.

-- 
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: (AXIS-1963) WSDL2JAVA problems with custom exceptions

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1963?page=all ]
     
Davanum Srinivas resolved AXIS-1963:
------------------------------------

    Resolution: Fixed

closing as fixed.

> WSDL2JAVA problems with custom exceptions
> -----------------------------------------
>
>          Key: AXIS-1963
>          URL: http://issues.apache.org/jira/browse/AXIS-1963
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC2, 1.2RC3
>  Environment: Linux
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl, LocalXQueryService.wsdl
>
> I have a custom exception coded as follows:
> public class MySOAPFault extends AxisFault
> {
>     public static final String ERROR="Error.1";
>     
>     public MySOAPFault(String code, String message)
>     {
>         super(message);
>         
>         setFaultCodeAsString(code);
>     }
> }
> And this is its WSDL mapping:
> <element name="MySOAPFault">
>    <complexType>
>     <sequence/>
>    </complexType>
> </element> 
> ...
> <wsdl:message name="MySOAPFault">
>       <wsdl:part element="tns:MySOAPFault" name="fault"/>
> </wsdl:message>
> ...
> When I run WSDL2JAVA over my WSDL, I get a class named MySOAPFault_Element (not MySOAPFault, as it should be), leading to compile time errors.
> However, all works fine if I use Axis API directly, or if I use other languages: the custom exception is correctly thrown and deserialized.

-- 
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] Updated: (AXIS-1963) WSDL2JAVA problems with custom exceptions

Posted by "Sergio Bossa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1963?page=all ]

Sergio Bossa updated AXIS-1963:
-------------------------------

    Attachment: LocalXQueryService.wsdl

Here is the complete WSDL.

Regards,

Sergio B.

> WSDL2JAVA problems with custom exceptions
> -----------------------------------------
>
>          Key: AXIS-1963
>          URL: http://issues.apache.org/jira/browse/AXIS-1963
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC2, 1.2RC3
>  Environment: Linux
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> I have a custom exception coded as follows:
> public class MySOAPFault extends AxisFault
> {
>     public static final String ERROR="Error.1";
>     
>     public MySOAPFault(String code, String message)
>     {
>         super(message);
>         
>         setFaultCodeAsString(code);
>     }
> }
> And this is its WSDL mapping:
> <element name="MySOAPFault">
>    <complexType>
>     <sequence/>
>    </complexType>
> </element> 
> ...
> <wsdl:message name="MySOAPFault">
>       <wsdl:part element="tns:MySOAPFault" name="fault"/>
> </wsdl:message>
> ...
> When I run WSDL2JAVA over my WSDL, I get a class named MySOAPFault_Element (not MySOAPFault, as it should be), leading to compile time errors.
> However, all works fine if I use Axis API directly, or if I use other languages: the custom exception is correctly thrown and deserialized.

-- 
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