cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Transformation of Message after Join/Gather is throwing an error

Syed1234
Explorer
4,086

Hi,

I am using gather with XPath to join multiple same format message together. It works well as long as there is no message mapping (to transform message into desired format) after Gather. When I have message mapping or xslt to transform message after gather, then I receive error


Inbound processing in endpoint at /getData failed with message "Fault:Sequential processing failed for number 1. Exchange[ID-vsa]. Caused by: [com.sap.it.rt.camel.aggregate.exception.AggregationStrategyException - com.sap.it.rt.camel.aggregate.exception.AggregationStrategyException: com.sap.it.rt.camel.aggregate.exception.AggregationStrategyException: No nodes Found matching the source XPath - Cannot continue with Aggregation.]", caused by "AggregationStrategyException:No nodes Found matching the source XPath - Cannot continue with Aggregation."

I am using Sender channel soap (Request-Reply) request to return XML message.

In trace, I can see error message envelope appear on join action. Any clue what is the reason for such error when using message transformation after gather action?

Accepted Solutions (0)

Answers (2)

Answers (2)

Sriprasadsbhat
Active Contributor

Hello Farhan,

Could you please provide more information on below

1) Input payload

2) Screenshot of your iflow.

3) Screenshot of your gather with condition and Message Mapping.

Regards,

Sriprasad Shivaram Bhat

Syed1234
Explorer
0 Likes

Hi Sriprasad,

Thanks for your answer.

Sure.This is iflow

Sorry, its a bit lengthy. Issue is arriving only when having highlighted message mapping after Gather. When I want to transform the XML payload to desired one, then error appears. If I remove this message mapping then the result come coorectly.

1) Input payload

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header/>
   <soap:Body>
      <PerPerson> <PerPerson>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </PerPerson>
         <PerPerson>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </PerPerson>
         <PerPerson>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </PerPerson>
         <PerPerson>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </PerPerson>
      </PerPerson>
   </soap:Body>
</soap:Envelope>

Desired Payload

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header/>
   <soap:Body>
      <PerPerson>
         <Employee>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </Employee>
         <Manager1>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </Manager1>
         <Manager2>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </Manager2>
         <Manager3>
            <latestTerminationDate/>
            <externalCode>value</externalCode>
            <emailAddress>value</emailAddress>
         </Manager3>
      </PerPerson>
   </soap:Body>
</soap:Envelope>

Due to replacing PerPerson via Employee, Manager1,Manager2,Manager3, its causing an error as I have used before Gather with XPath on //PerPerson/PerPerson

Thanks.

RaviRIyer
Participant
0 Likes
Would be nice if you could share your fix .....