3 Replies Latest reply on Dec 9, 2010 10:31 AM by rohitvadera25

    SOAPProcessor Error

    rohitvadera25

      Hi,

       

      I am new in JBossESB world and trying to ececute one simple example follwoing different tutorials over net... got to run the SystemPrintln action but unable to publish the WS over ESB... i am  hereby pasting my esb config file , the log on server and the client code i am using to invoke the service over esb.

       

      I have successfully deployed the WS as i can see its wsdl and can see the response through soapui...

       

      If possible please let me know what I am missing...

       

      The log from server

       

      08:47:09,438 INFO [STDOUT] In the ESB:

      08:47:09,438 INFO [STDOUT] [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:test="http://test.com/"> <soapenv:Header/> <soapenv:Body> <test:sayHello> <!--Optional:--> <arg0>rohit</arg0> </test:sayHello> </soapenv:Body></soapenv:Envelope>].

      08:47:26,234 INFO [ServiceInvoker] Unresponsive EPR: InVMEpr [ PortReference < <wsa:Address invm://4d7943617465676f72792424242424242424242424244d794874747050726f787953657276696365/false?false#10000/>, <wsa:ReferenceProperties jbossesb:passByValue : false/> > ] for message: header: [ ]

      08:47:26,265 INFO [ServiceInvoker] Badly formed EPR [EPR: PortReference < <wsa:Address http://localhost:7777/> >] for Service [MyCategory:MyHttpProxyService] and Message [header: [ ]].Courier for EPR not supported: ESB-unaware EPR used!

      08:47:26,265 INFO [ServiceInvoker] Delivering message [header: [ ]] to DLQ.

       

      The jboss-esb.xml

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      <?

       

       

      xml version="1.0"

      ?>

      <

       

       

      jbossesb parameterReloadSecs=

      "5"

       

       

      xmlns=

      "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.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.2.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"

      >

       

       

      <providers

      >

       

       

      <jbr-provider host="localhost" name="MyHttpGateway" protocol="http"

      >

       

       

      <jbr-bus busid="MyHttpGateway" port="7777"

      />

       

       

      </jbr-provider

      >

       

       

      </providers

      >

       

       

      <services

      >

       

       

      <service category="MyCategory" description=

      "MyDescription"

       

       

      invmScope="GLOBAL" invmTransacted="true" name="MyHttpProxyService"

      >

       

       

       

      <listeners

      >

       

       

      <jbr-listener busidref="MyHttpGateway" is-gateway="true" name="MyHttpGateway"

      />

       

       

      </listeners

      >

       

       

       

      <actions mep="RequestResponse"

      >

       

       

       

      <action class="org.jboss.soa.esb.actions.SystemPrintln" name="message"

      >

       

       

      <property name="message" value="In the ESB"

      />

       

       

      </action

      >

       

       

       

      <action name="SOAPProcessor" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"

      >

       

       

      <property name="jbossws-endpoint" value="http://localhost:8080/WebServiceProject/MyWebService"

      />

       

       

      </action

      >

       

       

       

      </actions

      >

       

       

       

      </service

      >

       

       

      </services

      >

      </

       

       

      jbossesb

      >

       

      The Client code

       

      package com.test;

      import org.jboss.remoting.Client;
      import org.jboss.remoting.InvokerLocator;


      public class ESBClient {

      public static void main(String aregs[])
      {
        ESBClient esb = new ESBClient();
        try {
         String message = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:test=\"http://test.com/\">   <soapenv:Header/>   <soapenv:Body>      <test:sayHello>         <!--Optional:-->         <arg0>rohit</arg0>      </test:sayHello>   </soapenv:Body></soapenv:Envelope>";
          esb.sendMessageToJBRListener("http", 7777, message);
        } catch (Throwable e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
        }
      }
      private void sendMessageToJBRListener(String protocol, int port, String message) throws Throwable
      {  
        String locatorURI = protocol + "://localhost:" + port;  
        InvokerLocator locator = new InvokerLocator(locatorURI);  
       
        System.out.println("Calling JBoss Remoting Listener using locator URI: " + locatorURI);   
        Client remotingClient = null;  
        try
        {     
         remotingClient = new Client(locator);      
         remotingClient.connect();       
         // Deliver the message to the listener...      
         Object response = remotingClient.invoke(message);      
         System.out.println("JBR Class: " + response.getClass().getName());     
         System.out.println("Response from JBoss Remoting Listener '" + locatorURI + "' was '" + response + "'.");  
        }
        catch(Exception ex)
        {
         ex.printStackTrace();
        }
        finally {      
         if(remotingClient != null) {          
          remotingClient.disconnect();      
          }  
         }
        }
      }

        • 1. Re: SOAPProcessor Error
          rohitvadera25

          Hi Everyone,

           

          Is this forum not for people new in JbossESB world? Is there any help available for people trying to learn JBoss ESB?

           

          Thanks

          • 2. Re: SOAPProcessor Error
            kconner

            The quickstarts include examples of this, have you checked those out?

            • 3. Re: SOAPProcessor Error
              rohitvadera25

              Thanks for response Kevin.

               

              Yes got to see the example in quickstart.

               

              I have one another basic question the example in quickstart uses jms-listener. Can i get it run without the jms listener as I want to keep it very simple one WS and the SOAPProcessor to invoke it... i tried though but it was giving error..

               

              In the try

               

              I made one JAXWS WS which was successfully called by SOUPUI

              I made one jboss-esb.xml as follows which is very simple by removing all the jms entries and tried to deploy it through eclipse but server could not be started...

               

              So my question would be are the two components WS.class and jboss-esb.xml are sufficient enough or i am missing something...

               

               

              <?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"
                      parameterReloadSecs="5">

                  <providers>
                      <jbr-provider name="JBR-Http" protocol="http" host="localhost">
                          <jbr-bus busid="Http-1" port="8765" />
                      </jbr-provider>

                      <jbr-provider name="JBR-Socket" protocol="socket" host="localhost">
                          <jbr-bus busid="Socket-1" port="8888" />
                      </jbr-provider>

                  </providers>

                  <services>

                      <service category="MyServiceCategory" name="MyWSProducerService" description="WS Frontend speaks natively to the ESB">

                          <listeners>
                              <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true"/>
                              <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true"/>

                          </listeners>
                          <actions>
                              <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
                                  <property name="message"
                                            value="[Quickstart_webservice_producer] BEFORE invoking jbossws endpoint"/>
                              </action>
                              <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
                                  <property name="jbossws-endpoint" value="GoodbyeWorldWS"/>
                              </action>
                              <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
                                  <property name="message"
                                            value="[Quickstart_webservice_producer] AFTER invoking jbossws endpoint"/>
                              </action>
                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
                          </actions>
                      </service>

                  </services>

              </jbossesb>