[jboss-svn-commits] JBL Code SVN: r16492 - in labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer: esb/src/org/jboss/soa/esb/samples/trailblazer/actions and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Nov 10 06:21:13 EST 2007
Author: mark.little at jboss.com
Date: 2007-11-10 06:21:12 -0500 (Sat, 10 Nov 2007)
New Revision: 16492
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java
Log:
http://jira.jboss.com/jira/browse/JBESB-1319
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java 2007-11-10 06:20:14 UTC (rev 16491)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java 2007-11-10 11:21:12 UTC (rev 16492)
@@ -126,7 +126,7 @@
}
}
- private int sendToCreditAgency(Customer customer) {
+ private int sendToCreditAgency(Customer customer) {d
Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
Message replyMessage;
int score = 0;
@@ -135,11 +135,11 @@
logger.debug("sending to credit agency");
//set the customer inside the message - csv format for now to test
- message.getBody().setByteArray(customer.getCSV().getBytes());
+ message.getBody().add(customer.getCSV());
replyMessage = serviceInvoker.deliverSync(message, 5000);
if (replyMessage != null) {
- logger.info("received reply from creditAgency action: " + replyMessage.getBody().getByteArray());
- String xx = new String(replyMessage.getBody().getByteArray());
+ logger.info("received reply from creditAgency action: " + replyMessage.getBody().get());
+ String xx = (String) replyMessage.getBody().get();
score = Integer.parseInt(xx.trim());
} else {
logger.debug("reply not received from credit agency - setting a value of 5");
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java 2007-11-10 06:20:14 UTC (rev 16491)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java 2007-11-10 11:21:12 UTC (rev 16492)
@@ -36,12 +36,12 @@
public BankResponseActions(ConfigTree config) { _config = config; }
public Message processResponseFromJMSBank(Message message) throws Exception {
- System.out.println("Got the message from the JMS bank: " + message.getBody().getByteArray());
+ System.out.println("Got the message from the JMS bank: " + message.getBody().get());
- _logger.debug("message received: \n" + new String(message.getBody().getByteArray()));
+ _logger.debug("message received: \n" + message.getBody().get());
//get the response from the bank and set it in the customer
- ConfigTree tree = ConfigTree.fromXml(new String(message.getBody().getByteArray()));
+ ConfigTree tree = ConfigTree.fromXml((String) message.getBody().get());
String quoteID = tree.getFirstTextChild("quoteId");
String rate = tree.getFirstTextChild("interestRate");
String errorCode = tree.getFirstTextChild("errorCode");
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java 2007-11-10 06:20:14 UTC (rev 16491)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java 2007-11-10 11:21:12 UTC (rev 16492)
@@ -44,7 +44,7 @@
_logger.debug("message received: " + Util.serialize(message) );
- String csvData = new String(message.getBody().getByteArray());
+ String csvData = (String) message.getBody().get();
_logger.debug("csv data received: " + csvData);
@@ -56,7 +56,7 @@
//send back the reply
Message replyMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
_logger.info("CreditAgency sending back a credit score of " + score);
- replyMessage.getBody().setByteArray(Integer.toString(score).getBytes());
+ replyMessage.getBody().add(Integer.toString(score));
return replyMessage;
}
More information about the jboss-svn-commits
mailing list