You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2014/07/02 01:02:24 UTC
[jira] [Resolved] (CXF-5789) Add methods to get input and output
SOAP headers to SOAPBindingUtil
[ 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)