davsclaus commented on code in PR #9816:
URL: https://github.com/apache/camel/pull/9816#discussion_r1158130194


##########
components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapDataFormat.java:
##########
@@ -121,33 +121,18 @@ protected List<Object> createContentFromObject(
             final Object inputObject, String soapAction,
             List<Object> headerElements) {
         List<Object> bodyParts = new ArrayList<>();
-        List<Object> headerParts = new ArrayList<>();
         bodyParts.add(inputObject);
 
         List<Object> bodyElements = new ArrayList<>();
         for (Object bodyObj : bodyParts) {
             QName name = 
elementNameStrategy.findQNameForSoapActionOrType(soapAction, 
bodyObj.getClass());
             if (name == null) {
                 LOG.warn("Could not find QName for class {}", 
bodyObj.getClass().getName());
-                continue;
             } else {
                 bodyElements.add(getElement(bodyObj, name));
             }
         }
 
-        for (Object headerObj : headerParts) {
-            QName name = 
elementNameStrategy.findQNameForSoapActionOrType(soapAction, 
headerObj.getClass());
-            if (name == null) {
-                LOG.warn("Could not find QName for class {}", 
headerObj.getClass().getName());
-                continue;
-            } else {
-                JAXBElement<?> headerElem = getElement(headerObj, name);
-                if (null != headerElem) {
-                    headerElements.add(headerElem);

Review Comment:
   Headers is added to the incoming headerElements parameter in the method, so 
the old code looks correct



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to