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.