1 2 Previous Next 17 Replies Latest reply on Jan 20, 2009 10:54 AM by sgc Go to original post
      • 15. Re: Difference between Sync and Async delivery in ServiceInv

        hi

        can send to me sample code aboute ServiceInvoker and configuration

        thank's

        • 16. Re: Difference between Sync and Async delivery in ServiceInv
          tfennelly

           

          "tommy111" wrote:
          hi

          can send to me sample code aboute ServiceInvoker and configuration

          thank's


          Again... RTM and look at the quickstarts!!

          • 17. Re: Difference between Sync and Async delivery in ServiceInv
            sgc

            Hi...

            I have a similar problem, with JBoss [SOA] SOA_4.2.0.GA_TP02 (build: SVNTag=SOA_4.2.0.GA_TP02 date=200807081230).
            When a use deliverAsync it works fine, but when i use deliverSync i get a error (org.jboss.soa.esb.listeners.message.MessageDeliverException: Failed to deliver message).

            I use a webservice deployed as an .ear, in the class that sends the messsage the content looks like this.

            final ServiceInvoker serviceInvoker = new ServiceInvoker(serviceCategory, serviceName);
            
            Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
            
            final Call call = new Call();
            call.setMessageID(new URI(UUID.randomUUID().toString()));
            message.getHeader().setCall(call);
            message.getAttachment().put(ConstMessage.ATTACHMENT_NAME, attachmentName);
            message.getAttachment().put(ConstMessage.ATTACHMENT_REQUEST, attachmentValue);
            
            message = serviceInvoker.deliverSync(message, TIMEOUT_VALUE);




            The class/method that receives the message is deployed in a .esb project, and looks something like this.

            probe = probeFactory.unMarshaller((String)message.getAttachment().get(ConstMessage.ATTACHMENT_REQUEST));
            final ProbeDatabaseBras bras = databaseInterface.getProbe();
            sync(probe);
            message.getAttachment().put(ConstMessage.ATTACHMENT_REQUEST, probeFactory.marshaller(probe));
            
            return message;


            When the timeout value has been reached, i can see that the method that receives the messages runs twice, but the message with the updated probe is not returned to the calling class.
            I have tried using the native_client sample project within the .esb project and there it works fine, but if a split it up so that the calling code is within the .ear project and the receiving/returning code is in the .esb project the native_client sample don't work.

            What can be the problem?

            1 2 Previous Next