Author |
Message
|
ghoshly |
Posted: Tue Aug 09, 2016 12:38 pm Post subject: Calling Java methods from XSLT |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Hello,
I have a question regarding java usage through XSLT. According to bz90210_.htm " the calling of Java methods from a style sheet that directly or indirectly reference Java JRE XML processing methods is unsupported."
We use XSLT node and XSL maps for transformation and we do have embedded cache using MbGlobalMap and HashMap.
My question is - can we call a java method from XSLT to get some contents from the embedded cache using standard hashmap get operations using iterator?
Environment - WMB 8.0.0.6 planning to migrate to 10.0.0.5
Regards
................... |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2016 3:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should convert your XLSC to a Graphical Map.
Or if you really feel like it, a Compute node, JavaComputeNode, etc... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ghoshly |
Posted: Wed Aug 10, 2016 7:27 am Post subject: XSLT Flexibility |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Apart from using the existing transformation through xsl, XSLT node is providing the flexibility to choose the stylesheet dynamically and that feature is used heavily. We would loose that if we choose to go with map even if we are OK to re-write the transformation.
Please correct me if I am wrong and missing some trick to choose maps dynamically. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2016 7:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 10, 2016 7:35 am Post subject: Re: XSLT Flexibility |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ghoshly wrote: |
Please correct me if I am wrong and missing some trick to choose maps dynamically. |
So you're selecting a stylesheet based on the payload of the inbound message? Allowing you to simply drop a new stylesheet in when you need one?
The obvious question is why do you pay good money for IIB? Any XSLT server and a spot of Java code can do this for a fraction of the cost.
The next obvious point is the XSLT node is really intended for backwards compatibility with sites that have such a server and are migrating to IIB for the increased functionality. As time goes by, more and more new features (like the global cache) will be out of reach for you. Without writing a ton of custom Java functions to duct tape the XSLT to them, which brings me back to the "XSLT server and a spot of Java code" I mention above.
I'd also like to ask why you need this level of dynamism in your solution. How often do these transformations change? Also what level of testing and governance have you managed to introduce? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 10, 2016 7:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
The XSLT node in IIB is slow. |
And of course there's that.
My server and code solution will probably outperform the XSLT node for anything beyond a basic transformation. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ghoshly |
Posted: Wed Aug 10, 2016 7:55 am Post subject: |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Thanks a lot Jeff. I would definitely give it a try. I was not aware about MappingRoutine.
Your suggestion makes more sense when I came to know about the following but only available only when we would migrate.
https://developer.ibm.com/integration/blog/2015/11/16/graphical-data-mapping-with-global-cache/
Vitor - Thanks for reminding me the negatives of XSLT once again. Its not only change to existing mapping but addition of newer XSL also does not demands thorough checking of the flows...Please don't think that I am trying to debate in favour of XSLT, but with positives and negatives design decision was taken this way. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2016 8:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 10, 2016 8:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ghoshly wrote: |
Vitor - Thanks for reminding me the negatives of XSLT once again. Its not only change to existing mapping but addition of newer XSL also does not demands thorough checking of the flows...Please don't think that I am trying to debate in favour of XSLT, but with positives and negatives design decision was taken this way. |
XSLT is cool. My point is that running style sheets in IIB is at best owning & operating a semi when you could easily manage with an F-150.
It's not my money........  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 10, 2016 8:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
XSLT is cool. My point is that running style sheets in IIB is at best owning & operating a semi when you could easily manage with an F-150.
It's not my money........  |
I was going to say something about using a Ferrari Berlinetta to commute 5 miles... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 10, 2016 10:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Vitor wrote: |
XSLT is cool. My point is that running style sheets in IIB is at best owning & operating a semi when you could easily manage with an F-150.
It's not my money........  |
I was going to say something about using a Ferrari Berlinetta to commute 5 miles... |
I'd accept that as an alternative  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|