ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling Java methods from XSLT

Post new topic  Reply to topic
 Calling Java methods from XSLT « View previous topic :: View next topic » 
Author Message
ghoshly
PostPosted: Tue Aug 09, 2016 12:38 pm    Post subject: Calling Java methods from XSLT Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 10, 2016 3:54 am    Post subject: Reply with quote

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
View user's profile Send private message
ghoshly
PostPosted: Wed Aug 10, 2016 7:27 am    Post subject: XSLT Flexibility Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 10, 2016 7:31 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://www.ibm.com/support/knowledgecenter/SSKM8N_8.0.0/com.ibm.etools.mft.doc/br28700_.htm

The XSLT node in IIB is slow.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2016 7:35 am    Post subject: Re: XSLT Flexibility Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2016 7:37 am    Post subject: Reply with quote

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
View user's profile Send private message
ghoshly
PostPosted: Wed Aug 10, 2016 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 10, 2016 8:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Also note that even IIB v10 only supports XSLT v1
http://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ah36080_.htm
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2016 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Aug 10, 2016 8:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Aug 10, 2016 10:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calling Java methods from XSLT
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.