Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 99447 invoked from network); 3 Apr 2009 21:04:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2009 21:04:35 -0000 Received: (qmail 72246 invoked by uid 500); 3 Apr 2009 21:04:35 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 72199 invoked by uid 500); 3 Apr 2009 21:04:35 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 72189 invoked by uid 99); 3 Apr 2009 21:04:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 21:04:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 21:04:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E08F5234C003 for ; Fri, 3 Apr 2009 14:04:12 -0700 (PDT) Message-ID: <1565810952.1238792652905.JavaMail.jira@brutus> Date: Fri, 3 Apr 2009 14:04:12 -0700 (PDT) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Subject: [jira] Resolved: (CXF-2149) java.lang.ArrayStoreException getting headers in handler In-Reply-To: <41750987.1238685972948.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-2149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-2149. ------------------------------ Resolution: Fixed Fix Version/s: 2.2.1 2.1.5 2.0.11 > java.lang.ArrayStoreException getting headers in handler > -------------------------------------------------------- > > Key: CXF-2149 > URL: https://issues.apache.org/jira/browse/CXF-2149 > Project: CXF > Issue Type: Bug > Environment: JDK 1.6, Ubuntu Linux 8.10 > Reporter: Jose Antonio > Assignee: Daniel Kulp > Fix For: 2.0.11, 2.1.5, 2.2.1 > > > When calling > Object[] getHeaders(QName name, JAXBContext context, boolean allRoles) > In a header, I get an ArrayStoreException. Looking at the code, I've found this at org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getHeaders(SOAPMessageContextImpl.java:106): > public Object[] getHeaders(QName name, JAXBContext context, boolean allRoles) { > SOAPMessage msg = getMessage(); > SOAPHeader header; > try { > header = msg.getSOAPPart().getEnvelope().getHeader(); > if (header == null || !header.hasChildNodes()) { > return new Object[0]; > } > List ret = new ArrayList(); > Iterator it = CastUtils.cast(header.examineAllHeaderElements()); > while (it.hasNext()) { > SOAPHeaderElement she = it.next(); > if ((allRoles > || roles.contains(she.getActor())) > && name.equals(she.getElementQName())) { > > ret.add(context.createUnmarshaller().unmarshal(she)); > > } > } > return ret.toArray(new SOAPHeaderElement[ret.size()]); > } catch (SOAPException e) { > throw new WebServiceException(e); > } catch (JAXBException e) { > throw new WebServiceException(e); > } > } > ret is a list of objects that gets populated with unmarshalled elements. In the return statement it tries to cast it to an array of SOAPHeaderElement, but the elements inside are not SOAPHeaderElement so it throws the aforementioned exception. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.