cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim (JIRA)" <>
Subject [jira] Created: (CXF-1294) Problem creating several custom Headers
Date Wed, 12 Dec 2007 10:23:43 GMT
Problem creating several custom Headers

                 Key: CXF-1294
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.0.3
         Environment: Windows XP SP2, Eclipse 3.3, JAVA 1.6.03
            Reporter: Tim

  Hi all,
we generated a Java WS Client from given wsdl-files, which should generate a SOAP Request
with several Header entries.
At runtime one of two headers was dropped in the request.

Excerpt from generated Code:

public interface TelematikSignedPortType {

    @RequestWrapper(localName = "TelematikExecute", targetNamespace = "",
className = "")
    @ResponseWrapper(localName = "TelematikExecuteResponse", targetNamespace = "",
className = "")
    @WebMethod(operationName = "TelematikExecute", action = "")
    public void telematikExecute(
        @WebParam(targetNamespace = "", name = "Payload",
mode = Mode.INOUT)<>
        @WebParam(targetNamespace = "", name = "TransportHeader",
header = true, mode = Mode.INOUT)<> transportHeader,
        @WebParam(targetNamespace = "", name = "TelematikHeader",
header = true, mode = Mode.INOUT)<> telematikHeader
    ) throws FaultMessage;

This issue seems to be related to filling the AbstractMessageContainer with MessageParts.
This is done several times in the case of headers, overwriting  existing indices with the
container's current size. As a result the WrapperMsgInfo in
gets corrupted index values, so that the first header is overwritten by the second one and
so on.

		for (MessagePartInfo p : messageInfo.getMessageParts()) {
					if (Boolean.TRUE.equals(p
							.getProperty(ReflectionServiceFactoryBean.HEADER))) {
						MessagePartInfo mpi = wrappedMsgInfo.getMessagePart(p

                                                // MPI HAS CORRUPTED INDEX!

						if (objs.hasValue(p)) {
							newObjs.put(mpi, objs.get(p));

Suggested Hotfix AbstractMessageContainer.jaa
	public void addMessagePart(MessagePartInfo part) {

                // KEEP EXISTING INDEX IF ANY

		if (messageParts.containsKey(part.getName())) {
		} else {
		messageParts.put(part.getName(), part);

Thx for looking into this, keep up the good work.
Timmeh and Simon.

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

View raw message