cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-5789) Add methods to get input and output SOAP headers to SOAPBindingUtil
Date Tue, 01 Jul 2014 23:02:24 GMT

     [ https://issues.apache.org/jira/browse/CXF-5789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-5789.
------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.1
                   2.7.12
         Assignee: Daniel Kulp

> Add methods to get input and output SOAP headers to SOAPBindingUtil
> -------------------------------------------------------------------
>
>                 Key: CXF-5789
>                 URL: https://issues.apache.org/jira/browse/CXF-5789
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Peter Frandsen
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.7.12, 3.0.1
>
>
> SOAPBindingUtil has methods to get the first input and output SOAP header for a BindingOperation.
> Add methods to get list of all the headers.
> The method getSoapHeaders(List<ExtensibilityElement> exts) cannot be used as the
BindingOperation.getBindingInput().getExtensibilityElements() and BindingOperation.getBindingOutput().getExtensibilityElements()
returns List<Object> and not List<ExtensibilityElement> which cannot safely be
casted to List<ExtensibilityElement> without checking the type of each element in the
list (...getExtensibilityElements()  instanceof List<ExtensibilityElement> not legal
with Java generics).
> {code:title=org.apache.cxf.binding.soap.SOAPBindingUtil|language=java}
>     public static List<SoapHeader> getBindingInputSOAPHeaders(BindingOperation
bop) {
>         List<SoapHeader> headers = new ArrayList<SoapHeader>();
>         BindingInput bindingInput = bop.getBindingInput();
>         if (bindingInput != null) {
>             for (Object obj : bindingInput.getExtensibilityElements()) {
>                 if (isSOAPHeader(obj)) {
>                     headers.add(getProxy(SoapHeader.class, obj));
>                 }
>             }
>         }
>         return headers;
>     }
>     public static List<SoapHeader> getBindingOutputSOAPHeaders(BindingOperation
bop) {
>         List<SoapHeader> headers = new ArrayList<SoapHeader>();
>         BindingOutput bindingOutput = bop.getBindingOutput();
>         if (bindingOutput != null) {
>             for (Object obj : bindingOutput.getExtensibilityElements()) {
>                 if (isSOAPHeader(obj)) {
>                     headers.add(getProxy(SoapHeader.class, obj));
>                 }
>             }
>         }
>         return headers;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message