6 Replies Latest reply on Nov 16, 2009 9:34 AM by Poyan Gerami

    Async Webservice support SOA Platform 4.3.0

    Poyan Gerami Novice

      Hello,

      Is thair support for Async Webservice in JBoss ESB Soa platform 4.3.0 ?

      I have tes Sync Webservice support with this configuration and it works fine:

       <actions mep="RequestResponse" inXsd="/customer-data_v1.0.xsd"
       outXsd="/customer-data_v1.0.xsd" faultXsd="/customer-data-error_v1.0.xsd">
      



      But is thair support for Async to ? I have test to set the actions mep to "OneWay" but that does not work.

      Any idea ?





        • 1. Re: Async Webservice support SOA Platform 4.3.0
          Hans Wolffenbuttel Expert

          Hi,

          Could you give more information on what you want to accomplish with your async webservice? And if possible your service configuration in the jboss-esb.xml?

          Regards,

          Hans

          • 2. Re: Async Webservice support SOA Platform 4.3.0
            Poyan Gerami Novice

            very simple an async webservice, så clients can call the service in an async way....so the service can return an emty (or some kind off answer like "I recived your request") answer to clients and than go forward in the action pipeline. Simular to ServiceInvoker when you do deliverAsync and deliverSync.

            • 3. Re: Async Webservice support SOA Platform 4.3.0
              Hans Wolffenbuttel Expert

              Hi,

              If you have a request call with a return value (like "I recieved your request") then it is a synchronous request call. If you have no return value then it is an asynchronous request. The oneway implementation of the actionpipeline in your service means it wil not return a message when the end of the pipeline is reached. If you want your message to travel to other services you need to build in routing.

              To sum it all up:


              * Synchronous means in this context that you return a message on the same connection as the request.

              * Asynchronous means in this context you don't return anything on the same connection.


              Regards,

              Hans

              • 4. Re: Async Webservice support SOA Platform 4.3.0
                Poyan Gerami Novice

                i whant the second behaviour, not returning anything to the client. when i set the OneWay I get error.

                ERROR:

                <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                 <env:Header/>
                 <env:Body>
                 <env:Fault>
                 <faultcode>env:Server</faultcode>
                 <faultstring>Failed to deliver message [header: [ ]] to Service [customerService:getCustomer]. Check for errors.</faultstring>
                 </env:Fault>
                 </env:Body>
                </env:Envelope>
                


                Logg:

                14:50:20,982 INFO [ServiceInvoker] Unresponsive EPR: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/getCustomerWS/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : or
                g.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfa
                ces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:destination-name : queue/getCustomerWS/>, <wsa:ReferenceProperties jbossesb:specification-version
                 : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_A
                CKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] for message: header: [ ]
                






                ESB Service:

                <?xml version="1.0"?>
                <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.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
                 <providers>
                 <jms-provider connection-factory="ConnectionFactory" name="JBossMessaging">
                 <jms-bus busid="wsGetChannel">
                 <jms-message-filter dest-type="QUEUE"
                 dest-name="queue/getCustomerWS" />
                 </jms-bus>
                 </jms-provider>
                
                
                
                 </providers>
                 <services>
                 <service category="customerService" description="Get a customer" name="getCustomer">
                 <listeners>
                 <jms-listener name="WS-Listener" busidref="wsGetChannel"
                 maxThreads="1" is-gateway="false">
                 </jms-listener>
                 </listeners>
                
                 <actions mep="OneWay" inXsd="/customer-data_v1.0.xsd"
                 outXsd="/customer-data_v1.0.xsd" faultXsd="/customer-data-error_v1.0.xsd">
                
                 <action name="log" class="se.xxx.fik.getcustomer.actions.LogAction">
                 <property name="logLevel" value="info" />
                 <property name="logger" value="customerService" />
                 <property name="message" value="[getCustomer][RECEIVE] " />
                 <property name="logBody" value="true" />
                 </action>
                
                 <action name="validate" class="com.xxx.esb.actions.validation.XsdValidationAction">
                 <property name="xsdLocation" value="customer-data_v1.0.xsd" />
                 </action>
                
                
                 </actions>
                 </service>
                 </services>
                </jbossesb>
                
                
                
                
                


                • 5. Re: Async Webservice support SOA Platform 4.3.0
                  Hans Wolffenbuttel Expert

                  Hi,

                  You could try to remove the outXsd parameter from your actions node. The mep parameter is set automaticaly to oneway if you do not define an outXsd parameter.

                  Regards,

                  Hans

                  • 6. Re: Async Webservice support SOA Platform 4.3.0
                    Poyan Gerami Novice

                    Thanks. That seams to work.