[ 
https://issues.apache.org/jira/browse/CXF-3762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13609178#comment-13609178
 ] 

Giljo Scaria commented on CXF-3762:
-----------------------------------


Thanks Daniel and Piepera for the patch . But the generated code only adds the 
classname instead of fully qualified name and there is no import statement 
added for the custom exception supplied.

I have specified to use "com.google.adwords.api.AdwordsException" as 
exceptionSuper and wsdl2java maven plugin creates the following wsdl fault . 
But it didn't add an import statement for 
com.google.adwords.api.AdwordsException and compilation failed.

     @WebFault(name = "ApiExceptionFault", targetNamespace = 
"https://adwords.google.com/api/adwords/billing/v201209";)
      public class ApiException extends AdwordsException {

Could you please fix it to either add the import statement or use the fully 
qualified name.
______

WSDL2JAVA Usage
--------------------

wsdl2java -d C:\Dev\src\main\java  -exceptionSuper 
com.google.adwords.api.AdwordsException -client -verbose 
-xjc-Xvalue-constructor -xjc-npa  
https://adwords.google.com/api/adwords/cm/v201209/CampaignService?wsdl

                
> Add an -exceptionSuper flag, allowing wsdl2java to generate exceptions which 
> extend from java.lang.RuntimeException
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3762
>                 URL: https://issues.apache.org/jira/browse/CXF-3762
>             Project: CXF
>          Issue Type: New Feature
>          Components: Tooling
>    Affects Versions: 2.4.2
>            Reporter: aaron pieper
>            Assignee: Daniel Kulp
>              Labels: jaxb, wsdl2java
>             Fix For: 2.4.3
>
>         Attachments: patch.txt
>
>
> When using CXF's wsdl2java tool, generated exceptions always extend 
> java.lang.Exception. It would be nice if exceptions could optionally extend 
> java.lang.RuntimeException instead. This could be accomplished by adding a 
> flag like -exceptionSuper=.... on the wsdl2java tool, which would allow us to 
>  specify our own superclass.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to