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 » Passsing a Bean Object from Java Compute node to SOAP Reply

Post new topic  Reply to topic
 Passsing a Bean Object from Java Compute node to SOAP Reply « View previous topic :: View next topic » 
Author Message
sathish.mani
PostPosted: Wed Nov 19, 2014 3:38 pm    Post subject: Passsing a Bean Object from Java Compute node to SOAP Reply Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Nov 20, 2014 5:43 am    Post subject: Re: Passsing a Bean Object from Java Compute node to SOAP Re Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Nov 20, 2014 6:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Nov 20, 2014 6:40 am    Post subject: Reply with quote

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
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 » Passsing a Bean Object from Java Compute node to SOAP Reply
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.