camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Blackard (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (CAMEL-9066) Include any headers unmarshalled by SoapJaxbDataFormat in content marshalled by the same.
Date Tue, 11 Aug 2015 12:56:46 GMT

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

Bob Blackard updated CAMEL-9066:
--------------------------------
    Comment: was deleted

(was: This is a "patch" file, but I have intentionally not used the .patch extension since
the tests don't actually run the way I expected - and I'm not sure why what's happening is
happening.)

> Include any headers unmarshalled by SoapJaxbDataFormat in content marshalled by the same.
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9066
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9066
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-soap
>    Affects Versions: 2.12.5, 2.16.0, 2.15.3, 2.14.4, Future, 2.16
>         Environment: Any
>            Reporter: Bob Blackard
>            Assignee: Willem Jiang
>              Labels: patch
>             Fix For: 2.16.0, 2.15.3, 2.14.4, Future, 2.16
>
>         Attachments: camel.patch, soapjaxb-header-marshal-example.zip, unit_tests.patch
>
>
> The current implementation of the Soap11DataFormatAdapter and Soap12DataFormatAdapter
will never generate SOAP Headers when a JAXB object is the inputObject.
> If the unmarshal is done with ignoreUnmarshalledHeaders set to false, then the SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST
message header is populated with a list of Objects or JAXBElement<?>s.  However, during
the doMarshal, this message header is never referenced.  Therefore, the sequence:
> from("direct:source").unmarshal(fromSoapDataFormat).process(doSomething).marshal(toSoapDataFormat).to("mock:end");
> will never produce SOAP Headers in the outbound document.
> The doUnmarshal passes the inputObject and an empty List<JAXBElement<?>>
into createContentFromObject.  However, is the inputObject is an ordinary JAXB object (or
JAXBElement<?>) then no header content will be created, and since the Exchange isn't
sent to createContentFromObject, the SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST cannot
be referenced.
> It seems to me that, if ignoreUnmarshalledHeaders is false, and the SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST
is non-empty, and in the event the inbound Exchange does not contain an Exception, then the
contents of the SoapJaxbDataFormat.SOAP_UNMARSHALLED_HEADER_LIST should be added to the headerContent
before the call to createContentFromObject.
> I have checked the code for SoapJaxbDataFormat, Soap11DataFormatAdapter and Soap12DataFormatAdapter
from camel-soap 2.12.0 through 2.15.2 and it looks like these three classes haven't changed.
> I crated a demo project and patch, originally against JBoss Fuse 6.1.0, but offer it
here for the camel-soap 2.12.x branch.  I have also applied and tested the patch against camel-soap
in the master branch (2.16-SNAPSHOT).  Indeed, it looks like this patch can be applied from
any point 2.12 and forward.
> The demo can be run against 2.12.5 (or any released version - just change the camel.version
property in the POM) to demonstrate what I think is the failure.  It can also be run against
a patched 2.12.6-SNAPSHOT or 2.16-SNAPSHOT (again, just play around with the camel.version
property) to demonstrate what I think is correct behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message