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 2008/02/19 23:12:43 UTC

[jira] Resolved: (CXF-1208) WrapperClassInInterceptor incorrecltly handing SOAP headers

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

Daniel Kulp resolved CXF-1208.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.4
         Assignee: Daniel Kulp

> WrapperClassInInterceptor incorrecltly handing SOAP headers
> -----------------------------------------------------------
>
>                 Key: CXF-1208
>                 URL: https://issues.apache.org/jira/browse/CXF-1208
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.0.2
>         Environment: windows XP, JBoss
>            Reporter: Incognito
>            Assignee: Daniel Kulp
>             Fix For: 2.0.4
>
>
> The following code block in WrapperClassInInterceptor is throwing IndexOutOfBoundsExceptions. The reason is that the newParams list has two (null) list entries, but the MessagePartInfo indeces that are being added to the remove arraylist are 1 and 2. 
>                 List<Integer> removes = null;
>                 for (MessagePartInfo part : messageInfo.getMessageParts()) {
>                     if (Boolean.TRUE.equals(part.getProperty(ReflectionServiceFactoryBean.HEADER))) {
>                         MessagePartInfo mpi = wrappedMessageInfo.getMessagePart(part.getName());
>                         if (lst.hasValue(mpi)) {
>                             newParams.put(part, lst.get(mpi));
>                         } else if (mpi.getTypeClass() == null) {
>                             //header, but not mapped to a param on the method
>                             if (removes == null) {
>                                 removes = new ArrayList<Integer>();
>                             }
>                             removes.add(mpi.getIndex());
>                         }
>                     }
>                 }
>                 if (removes != null) {
>                     Collections.sort(removes, Collections.reverseOrder());
>                     for (Integer i : removes) {
>                         newParams.remove(i.intValue()); // <= error thrown here
>                     }
>                 }
> The two items being removed are a username and password header set in my WSDL file: 
>       <wsdl:input name="sayHelloRequest">
>         <wsdlsoap:header message="impl:username" part="username" use="literal"/>
>         <wsdlsoap:header message="impl:password" part="password" use="literal"/>
>         <wsdlsoap:body use="literal"/>
>       </wsdl:input>
> It seems the wrappedMessageInfo correctly contains all three message parts (the sayHello invocation, and 2 headers) but messageInfo.getMessageParts() is only returned the latter two.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.