2 Replies Latest reply on Nov 23, 2011 10:05 AM by barney

    Beginner having trouble with modified command line output

    barney

      Hello,

           I'm trying to get the output to helloworld_action after modifying SendJMSMessage.java, MyJMSListenerAction.java and jboss-esb.xml.  When I send a string from SendJMSMessage to MyJMSListenerAction it is received and when I use the 2 methods provided they work (output appearing in the command line for the server after "ant deploy" and "ant runtest" in 2 other command lines).

           However, when I add a 3rd method to MyJMSListenerAction and put in an <action> for it in jboss-esb.xml then the first 2 actions listed in the xml work (screen output) but not the 3rd one.  Reordering produces the same result that only the first 2 show up.

           I get 2 error messages before the output:

      Error [RequestHandler] obj+parameter+must+not+be+null

      Error [RequestHandler] The+binding+template+was+not+found+for+the+given+key

       

           So: 1) is there another file that needs to be modified to let JBossESB know that there are 3 methods that should be in the response?

                 2) What documentation should I be reading to answer this?

       

      Thanks,

             Barney

        • 1. Re: Beginner having trouble with modified command line output
          tcunning

          Can you post your jboss-esb.xml?     And the method you added to the action class?

          • 2. Re: Beginner having trouble with modified command line output
            barney

            Hi Tom,

                 Below is jboss-esb.xml and below that is the method:

             

            <?xml version = "1.0" encoding = "UTF-8"?>

            <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"

                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"

                parameterReloadSecs="5">

             

             

                <providers>

                      <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">

                                 

                          <jms-bus busid="quickstartGwChannel">

                              <jms-message-filter

                                  dest-type="QUEUE"

                                  dest-name="queue/quickstart_helloworld_action_Request"

                              />

                          </jms-bus>

                          <jms-bus busid="quickstartEsbChannel">

                              <jms-message-filter

                                  dest-type="QUEUE"

                                  dest-name="queue/quickstart_helloworld_action_esb"

                              />

                          </jms-bus>

             

             

                      </jms-provider>

                  </providers>

                 

                  <services>

                     

                    <service category="HelloWorld_ActionESB"

                             name="SimpleListener"

                             description="Hello World" >

                      <listeners>

                          <jms-listener name="JMS-Gateway"

                                busidref="quickstartGwChannel"                        

                                is-gateway="true"

                          />

                          <jms-listener name="JMS-ESBListener"

                                          busidref="quickstartEsbChannel"

                          />               

                      </listeners>

                      <actions mep="OneWay">

                       <action name="action2"

                                class="org.jboss.soa.esb.actions.SystemPrintln"

                       />

                       <action name="displayAction"          class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"

                          process="displayMessage">

                          <property name="exceptionMethod" value="exceptionHandler"/>

                                </action>

                                  <action name="playWithAction"                                   class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"

                                            process="playWithMessage">                          

                                     <property name="exceptionMethod" value="exceptionHandler"/>

                                  </action>

                                <action name="testNewMethodAndOrderAction"    class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"

                          process="testNewMethodAndOrder">

                          <property name="exceptionMethod" value="exceptionHandler"/>

                       </action>

                       <action name="notificationAction"

                           class="org.jboss.soa.esb.actions.Notifier">

                         <property name="okMethod" value="notifyOK" />

                         <property name="notification-details">

                                        <NotificationList type="OK">

                                      <target class="NotifyConsole" />

                                          <target class="NotifyQueues">

                                            <messageProp name="quickstart" value="hello_world_action" />

                                            <queue jndiName="queue/quickstart_helloworld_action_Response"/>

                                          </target>

                                        </NotificationList>

                                       </property>

                                     </action>

                       <!-- The next action is for Continuous Integration testing -->

                                <action                                                                                       name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>

                      </actions>

                    </service>

                  </services>

                

            </jbossesb>

            //-------------------------------------------------------------------------------------------------------------------------------------

            public Message testNewMethodAndOrder(Message message) throws Exception

              {

                  try

                  {

                      System.out.println("running");

                  Body msgBody = message.getBody();    

                  String st = msgBody.get().toString();

                  //st.replaceAll("\\d", "Replaced!");

                  msgBody.add("testNew---MethodAndOrder"); //st);

                  }

                  catch (Exception e)

                  {

                     

                      System.out.println("broke");

                      e.printStackTrace();

                  }

                  return message;

              }