cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Mazza (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1208) WrapperClassInInterceptor incorrecltly handing SOAP headers
Date Wed, 14 Nov 2007 00:13:43 GMT

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

Glen Mazza commented on CXF-1208:
---------------------------------

Incognito, when/where is this error occurring--when you run a client generated via wsdl2java?
 Or are you using the Dispatch object?  I think we need more information.  Also, I think you're
using implicit SOAP headers there--headers defined in the WSDL:binding but not the WSDL:portType
section[1]--I'm not sure though if that is relevant to your problem.

[1]  http://www.jroller.com/gmazza/date/20071001 


> 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
>
> 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.


Mime
View raw message