3 Replies Latest reply on Aug 4, 2008 10:56 AM by Kevin Conner

    ServiceInvoker & deliverSync error

    Lucas Tiritilli Newbie

      Hi! I'm trying to send a Synchronic message with a ServiceInvoker object.
      This is my code


      public void consultTime() throws MessageDeliverException{
      
       System.setProperty("javax.xml.registry.ConnectionFactoryClass",
       "org.apache.ws.scout.registry.ConnectionFactoryImpl");
      
       ServiceInvoker deliveryAdapter = new ServiceInvoker("ExampleCategory","ExampleName");
      
       Message requestMessage = MessageFactory.getInstance().getMessage(
       MessageType.JBOSS_XML);
      
       requestMessage.getBody().add("now");
       try {
       Message m = deliveryAdapter.deliverSync(requestMessage,30000);
       }
      catch (FaultMessageException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       }
      catch (RegistryException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
       }
      
      
      }



      in my eclipse platform console I can see the StackTrace as follows


      Exception in thread "main" org.jboss.soa.esb.listeners.message.MessageDeliverException: Failed to deliver message [header: [ To: JMSEpr [ PortReference < <wsa:Address jms://127.0.0.1:1099/queue/webservice_consumer_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] ReplyTo: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/webservice_consumer_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='5344ca61-230f-4c0b-910d-047fc24273d8'/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] ]] to Service [ServicioDefiniciones:Definiciones]. Check for errors.
       at org.jboss.soa.esb.client.ServiceInvoker.post(ServiceInvoker.java:356)
       at org.jboss.soa.esb.client.ServiceInvoker.deliverSync(ServiceInvoker.java:196)
       at org.gwu.test.arnes.ExampleClient.consultTime(ExampleClient.java:42)
       at org.jboss.soa.esb.webserviceproducer.test.SendEsbMessage.main(SendEsbMessage.java:39)


      Also, when I send an asynchronic message everything works fine.

      Can anybody help me?