You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Simon Matic Langford (JIRA)" <ji...@apache.org> on 2008/04/16 18:23:21 UTC
[jira] Created: (CXF-1534) JAXWSMethodInvoker doesn't honour
faultcode in thrown SoapFault
JAXWSMethodInvoker doesn't honour faultcode in thrown SoapFault
---------------------------------------------------------------
Key: CXF-1534
URL: https://issues.apache.org/jira/browse/CXF-1534
Project: CXF
Issue Type: Bug
Components: JAX-WS Runtime
Affects Versions: 2.0.5
Reporter: Simon Matic Langford
I have written a service which implements an interface generated using wsdl2java.
In it I create and throw a SoapFault with a custom faultcode using code like this:
throw new SoapFault("An error message", new QName("http://www.company.com/blah","Server.InvalidConfiguration"));
But in JAXWSMethodInvoker:
protected Fault createFault(Throwable ex, Method m, List<Object> params, boolean checked) {
//map the JAX-WS faults
if (ex instanceof SOAPFaultException) {
SOAPFaultException sfe = (SOAPFaultException)ex;
SoapFault fault = new SoapFault(sfe.getFault().getFaultString(),
sfe,
sfe.getFault().getFaultCodeAsQName());
fault.setRole(sfe.getFault().getFaultActor());
fault.setDetail(sfe.getFault().getDetail());
return fault;
}
return super.createFault(ex, m, params, checked);
}
you're missing an extra if:
if (ex instanceof Fault) {
return (Fault) ex;
}
which means it drops through to super, which loses my fault code and only keeps the message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-1534) JAXWSMethodInvoker doesn't honour
faultcode in thrown SoapFault
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-1534.
------------------------------
Resolution: Fixed
Fix Version/s: 2.0.6
> JAXWSMethodInvoker doesn't honour faultcode in thrown SoapFault
> ---------------------------------------------------------------
>
> Key: CXF-1534
> URL: https://issues.apache.org/jira/browse/CXF-1534
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0.5
> Reporter: Simon Matic Langford
> Assignee: Daniel Kulp
> Fix For: 2.0.6
>
>
> I have written a service which implements an interface generated using wsdl2java.
> In it I create and throw a SoapFault with a custom faultcode using code like this:
> throw new SoapFault("An error message", new QName("http://www.company.com/blah","Server.InvalidConfiguration"));
> But in JAXWSMethodInvoker:
> protected Fault createFault(Throwable ex, Method m, List<Object> params, boolean checked) {
> //map the JAX-WS faults
> if (ex instanceof SOAPFaultException) {
> SOAPFaultException sfe = (SOAPFaultException)ex;
> SoapFault fault = new SoapFault(sfe.getFault().getFaultString(),
> sfe,
> sfe.getFault().getFaultCodeAsQName());
> fault.setRole(sfe.getFault().getFaultActor());
> fault.setDetail(sfe.getFault().getDetail());
>
> return fault;
> }
> return super.createFault(ex, m, params, checked);
> }
> you're missing an extra if:
> if (ex instanceof Fault) {
> return (Fault) ex;
> }
> which means it drops through to super, which loses my fault code and only keeps the message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-1534) JAXWSMethodInvoker doesn't honour
faultcode in thrown SoapFault
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned CXF-1534:
--------------------------------
Assignee: Daniel Kulp
> JAXWSMethodInvoker doesn't honour faultcode in thrown SoapFault
> ---------------------------------------------------------------
>
> Key: CXF-1534
> URL: https://issues.apache.org/jira/browse/CXF-1534
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0.5
> Reporter: Simon Matic Langford
> Assignee: Daniel Kulp
>
> I have written a service which implements an interface generated using wsdl2java.
> In it I create and throw a SoapFault with a custom faultcode using code like this:
> throw new SoapFault("An error message", new QName("http://www.company.com/blah","Server.InvalidConfiguration"));
> But in JAXWSMethodInvoker:
> protected Fault createFault(Throwable ex, Method m, List<Object> params, boolean checked) {
> //map the JAX-WS faults
> if (ex instanceof SOAPFaultException) {
> SOAPFaultException sfe = (SOAPFaultException)ex;
> SoapFault fault = new SoapFault(sfe.getFault().getFaultString(),
> sfe,
> sfe.getFault().getFaultCodeAsQName());
> fault.setRole(sfe.getFault().getFaultActor());
> fault.setDetail(sfe.getFault().getDetail());
>
> return fault;
> }
> return super.createFault(ex, m, params, checked);
> }
> you're missing an extra if:
> if (ex instanceof Fault) {
> return (Fault) ex;
> }
> which means it drops through to super, which loses my fault code and only keeps the message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.