[
https://issues.apache.org/jira/browse/CXF-5545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kamil Wiśniewski updated CXF-5545:
----------------------------------
Description:
wsdl2java when exceptionSuperclass is java.lang.Exception (the default) should
create respective constructors of java.lang.Exception in case when
fault has no fields.
*When operation is defined*
<wsdl:operation name="QueryAllReasons">
<wsdl:input name="QueryAllReasonsRQ"
message="rds:ReasonQueryAllRQ"/>
<wsdl:output name="QueryAllReasonsRS"
message="rds:ReasonQueryAllRS"/>
<wsdl:fault name="ServiceFault"
message="rds:ReasonDefinitionServiceFault"/>
</wsdl:operation>
*and message part for fault is empty*
<wsdl:message name="ReasonDefinitionServiceFault">
</wsdl:message>
*generated java class should look like this:*
package com.sabre.apd.cm.jaxb.plugin;
import javax.xml.ws.WebFault;
/**
* This class was generated by Apache CXF 3.0.0-milestone1
* 2014-02-06T03:28:41.558+01:00
* Generated source version: 3.0.0-milestone1
*/
public class ReasonDefinitionServiceFault extends Exception {
public ReasonDefinitionServiceFault() {
}
public ReasonDefinitionServiceFault(String message) {
super(message);
}
public ReasonDefinitionServiceFault(String message, Throwable cause) {
super(message, cause);
}
public ReasonDefinitionServiceFault(Throwable cause) {
super(cause);
}
}
was:
wsdl2java when exceptionSuperclass is java.lang.Exception (the default) should
create respective constructors of java.lang.Exception in case when
fault has no fields.
When operation is defined
<wsdl:operation name="QueryAllReasons">
<wsdl:input name="QueryAllReasonsRQ"
message="rds:ReasonQueryAllRQ"/>
<wsdl:output name="QueryAllReasonsRS"
message="rds:ReasonQueryAllRS"/>
<wsdl:fault name="ServiceFault"
message="rds:ReasonDefinitionServiceFault"/>
</wsdl:operation>
and message part i empty
<wsdl:message name="ReasonDefinitionServiceFault">
</wsdl:message>
generated java class whuld look like this:
package com.sabre.apd.cm.jaxb.plugin;
import javax.xml.ws.WebFault;
/**
* This class was generated by Apache CXF 3.0.0-milestone1
* 2014-02-06T03:28:41.558+01:00
* Generated source version: 3.0.0-milestone1
*/
public class ReasonDefinitionServiceFault extends Exception {
public ReasonDefinitionServiceFault() {
}
public ReasonDefinitionServiceFault(String message) {
super(message);
}
public ReasonDefinitionServiceFault(String message, Throwable cause) {
super(message, cause);
}
public ReasonDefinitionServiceFault(Throwable cause) {
super(cause);
}
}
> wsdl2java sholud create java.lang.Exception matching constructors for fault
> with no fields
> ------------------------------------------------------------------------------------------
>
> Key: CXF-5545
> URL: https://issues.apache.org/jira/browse/CXF-5545
> Project: CXF
> Issue Type: Improvement
> Components: Tooling
> Affects Versions: 3.0.0-milestone1
> Reporter: Kamil Wiśniewski
> Priority: Trivial
> Fix For: 3.0.0-milestone2
>
>
> wsdl2java when exceptionSuperclass is java.lang.Exception (the default)
> should create respective constructors of java.lang.Exception in case when
> fault has no fields.
> *When operation is defined*
> <wsdl:operation name="QueryAllReasons">
> <wsdl:input name="QueryAllReasonsRQ"
> message="rds:ReasonQueryAllRQ"/>
> <wsdl:output name="QueryAllReasonsRS"
> message="rds:ReasonQueryAllRS"/>
> <wsdl:fault name="ServiceFault"
> message="rds:ReasonDefinitionServiceFault"/>
> </wsdl:operation>
> *and message part for fault is empty*
> <wsdl:message name="ReasonDefinitionServiceFault">
> </wsdl:message>
> *generated java class should look like this:*
> package com.sabre.apd.cm.jaxb.plugin;
> import javax.xml.ws.WebFault;
> /**
> * This class was generated by Apache CXF 3.0.0-milestone1
> * 2014-02-06T03:28:41.558+01:00
> * Generated source version: 3.0.0-milestone1
> */
> public class ReasonDefinitionServiceFault extends Exception {
> public ReasonDefinitionServiceFault() {
> }
> public ReasonDefinitionServiceFault(String message) {
> super(message);
> }
> public ReasonDefinitionServiceFault(String message, Throwable cause) {
> super(message, cause);
> }
> public ReasonDefinitionServiceFault(Throwable cause) {
> super(cause);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)