camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Savitsky (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8708) SOAP unmarshalling shouldn't fail for Faults that lack an optional Detail element
Date Tue, 28 Apr 2015 18:51:06 GMT

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

Alex Savitsky commented on CAMEL-8708:
--------------------------------------

The culprit piece is in org.apache.camel.dataformat.soap.Soap12DataFormatAdapter.createExceptionFromFault()
method, first line dereferences fault.getDetail().getAny(), but getDetail() can return null
as per SOAP spec. I would've done a patch as well, but I'm not sure of the functionality the
original author has intended to put in this method, that's why I'd prefer the original author
to take a look at it. Basically, the whole method seem to insist to have the FaultDetail around,
yet it's optional, and it's not clear what the intended functionality was for its absence
(if there was any, that is)

> SOAP unmarshalling shouldn't fail for Faults that lack an optional Detail element
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-8708
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8708
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-soap
>    Affects Versions: 2.15.1
>            Reporter: Alex Savitsky
>            Priority: Minor
>
> Camel-soap code assumes that all Faults that a Camel SOAP endpoint is receiving, are
containing a Detail element. Sending a Fault without Detail will result in an NPE. Detail
is optional element in SOAP Faults (see http://www.w3.org/TR/soap12-part1/#soapfault) and
its absence should not generate an error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message