Looping Dev & Ishan

Thanks,

Maheeka Jayasuriya
Software Engineer
Mobile : +94777750661

---------- Forwarded message ----------
From: Maheeka Jayasuriya <[email protected]>
Date: Mon, Dec 15, 2014 at 6:26 AM
Subject: [Fast Track Training Project] For-Each with Json Expression
To: Isuru Ranawaka <[email protected]>, Kasun Indrasiri <[email protected]>
Cc: Jaminda Batuwangala <[email protected]>

Hi all,

I am having a few problems in the above integration (jsonpath) in terms of
the following.

   1. Getting the parent element for merging
   2. Removing iterating elements from original envelope
   3. Merging back the iterated messages

In xpath, respectively the above problems are solved as below:

   1. By taking the parent xpath with last occurence of "/" in the xpath.
   2. EIPUtils.getDetachedMatchingElements(SOAPEnvelope, MessageContext,
   SynapseXPath)
   3. EIPUtils.includeEnvelope(SOAPEnvelope, SOAPEnvelope, MessageContext,
   SynapseXPath)
   4. 2 and 3 provides references for the OMElement object as per
   EIPUtils.getMatchingElements(SOAPEnvelope, MessageContext, SynapseXPath)
   method and therefore can be directly modified.

In jsonpath,

com.jayway.jsonpath.JsonPath.read(String, String, Filter...) method is used
to extract the json elements which are actually returned as String.
Therefore, there is difficulty maintaining the references.

The only solution I can think of for the moment is converting jsonpath to
xpath, and processing in the payload similar to as done on xpath (I need to
verify that this is possible first) as xml.

Is there another way to extract elements, while maintaining references in
json level?

Please let me know your thoughts. How should I handle this?

Thanks,

Maheeka Jayasuriya
Software Engineer
Mobile : +94777750661
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to