Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
-
windows XP, JBoss
-
Novice
Description
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))
else if (mpi.getTypeClass() == null) {
//header, but not mapped to a param on the method
if (removes == null)
removes.add(mpi.getIndex());
}
}
}
if (removes != null) {
Collections.sort(removes, Collections.reverseOrder());
for (Integer i : removes)
}
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.