Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Can I set a HashMap to a Variable using JavaCallout,Java Callout return a HashMap and use in a Javascript Policy

Not applicable

HI,

I have a requirement to create a HashMap in JavaCallout and use that Key/Value map to construct a

HTML Page using XSL or JavaScript.

messageContext.setVariable("test" hashMap);

If I can set a HashMap, then my next question would be is how do I access that variable in JavaScript or XSL

Can you please let me know is this possible

Thanks in advance

Solved Solved
1 4 418
1 ACCEPTED SOLUTION

Nope.

But you could serialize it as a JSON hash from Java (using Jackson, etc) and then de-serialize it in JavaScript.

If you want to access it from within XSL, then that's a different story. Tell me specifically what you need and we can explore the problem.

View solution in original post

4 REPLIES 4