|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Wrapper existing XML service |
« View previous topic :: View next topic » |
Author |
Message
|
aspre1b |
Posted: Wed May 28, 2008 5:38 am Post subject: Wrapper existing XML service |
|
|
 Voyager
Joined: 05 Jul 2007 Posts: 78 Location: Coventry, UK
|
I’m trying to produce two new XML services by wrapping a current XML service. The two new services use a subset of the original service request and reply elements.
For example:
Original XML Service
Original elements for the request are A, B, C and D.
The following elements are returned: 1, 2, 3, 4
All the elements are mandatory, although they mainly contain a null/zero value.
I want to be able to facilitate two new services.
Service one – provide elements A and B in the request, and elements 1 and 2 are provided as part of the reply.
Service two - provide elements C and D in the request, and elements 3 and 4 are provided as part of the reply.
Depending on what service (service one or two) is invoked, determines what elements are returned.
Problem one – request
Service one will only provide A and B elements as part of the request and I need to populate C and D to be able to send the request XML to the original service.
My first thought was to use default values in the MRM but found this doesn’t work for XML. Reading through previous posts, I could achieve my goal by converting the message to CWF and then back to XML (http://www.mqseries.net/phpBB2/viewtopic.php?p=33722&sid=4bfc6005d3eb99e1a7c35db94102ea9e).
Problem two – reply
Service one should only return elements 1 and 2, however the original service returns elements 1, 2, 3 and 4. It would be relatively easy to drop the elements 3 and 4 in an ESQL module but is there a way to do it without ESQL? I think the answer is no unless you use message maps but that effectively creates the ESQL for you and is less efficient.
Some background
There are approximately 22 services that we need to wrapper, which means 44 request and reply flows in total. I’m trying to do this without invoking any transformation in an ESQL module, which I’m not sure is possible OR make the code generic so it can be based on.
Products:
Broker 5 CSD 8
MQ 5.3 CDS 12
Any help would be appreciated.
Bren |
|
Back to top |
|
 |
kimbert |
Posted: Wed May 28, 2008 6:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Problem one - request:
Options are:
a) write some ESQL
b) use the mapping node
c) convert to CWF and back to XML ( could be costly in CPU )
Problem two - reply
Options are:
a) write some ESQL
b) use the mapping node
There is no automatic way to drop extraneous elements from the message.
If you are seriously considering converting to CWF and back to XML in order to populate your default values, you are clearly not concerned about CPU usage. But you are obviously ( and rightly, in my view ) concerned about maintainability. So why not use the Mapping node for both? |
|
Back to top |
|
 |
aspre1b |
Posted: Wed May 28, 2008 7:46 am Post subject: |
|
|
 Voyager
Joined: 05 Jul 2007 Posts: 78 Location: Coventry, UK
|
Thanks for your help kimbert, didn't think there was another way to do it, but thought it was worth asking the question.
Also, performance is an issue for us so the CWF conversion solution looks to be a non starter.
Think we need to bite the bullet and just write the ESQL. I was told that Message maps were less efficient than using ESQL, I assume this is still the case. |
|
Back to top |
|
 |
kimbert |
Posted: Wed May 28, 2008 8:19 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I was told that Message maps were less efficient than using ESQL, I assume this is still the case. |
It used to be true. In some cases it still is true. Things have improved a lot in recent releases, and you may find that performance of the Mapping node is perfectly adequate. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|