|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Passsing a Bean Object from Java Compute node to SOAP Reply |
« View previous topic :: View next topic » |
Author |
Message
|
sathish.mani |
Posted: Wed Nov 19, 2014 3:38 pm Post subject: Passsing a Bean Object from Java Compute node to SOAP Reply |
|
|
Newbie
Joined: 19 Nov 2014 Posts: 8
|
I am totally new to MB. I am using the java compute node trying to access the database and structure the response based on the result set. I have a java code that does this operation and returns me a structured response in the form of a bean object(say ABC). ABC has Strings, Integers and another bean inside XYZ(sort of a one-to-many mapping).
I call a java method in the java compute node that takes an input and returns me ABC bean that has a structured response(verified using debugger). I am trying to pass this XML structure in the ABC bean to the SOAP reply node.
I am wondering if it is possible to pass the entire XML structure in one shot or should I create the structure again in the compute node and assign it from bean values. Appreciate any help. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 20, 2014 5:43 am Post subject: Re: Passsing a Bean Object from Java Compute node to SOAP Re |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sathish.mani wrote: |
I am wondering if it is possible to pass the entire XML structure in one shot or should I create the structure again in the compute node and assign it from bean values. Appreciate any help. |
The Soap reply node will expect a message tree (MbMessage in Java speak I understand). If it's possible to assign/cast/copy the bean onto that IBM object then that will work. If not, you'll need to make individual assignment.
Always bear in mind that WMB is not a native Java system (even though parts of it exploit Java) so some things which might work in such a native environment do not work in WMB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Nov 20, 2014 6:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can use JAXB to create classes that represent the SOAP Reply message tree.
You can then map from your bean to that/those beans, and pass the resulting object downstream out of your JavaCompute node. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 20, 2014 6:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
You can use JAXB to create classes that represent the SOAP Reply message tree.
You can then map from your bean to that/those beans, and pass the resulting object downstream out of your JavaCompute node. |
What he said. Much better than my "assign/cast/copy the bean onto that IBM object" _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|