Resending.. without the attachments as I didn't see this posted to the list yet...

Asankha C. Perera wrote:
Hi Badrys

This works as expected with Axis2 1.2 RC 2. Try this sample as follows:

1. Download Axis2 1.2 RC 2 from the link sent by Deepal, and extract the standalone archive into a directory (e.g. ~/java/axis2-1.2-RC2)

2. Copy the attached SimpleStockQuoteService.aar into the repository/services directory on the Axis2 installation (you could find the source of this service from http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/services/SimpleStockQuoteService (You may download the above using svn co <url> and build the archive yourself just by typing "ant")

3. Configure JMS using ActiveMQ (i.e. uncomment JMS listener default configuration), and copy the activemq-core..., activeio-core.. and geronimo-j2ee.. (check the names from the JMS documentation) to the axis2 installation lib directory

4. Start ActiveMQ 4.1 (I used 4.1.0), and then Axis2

5. Check the WSDL for the service at http://localhost:8080/axis2/services/SimpleStockQuoteService?wsdl
You should see something like what follows at the end..
   ....
<wsdl:port name="SimpleStockQuoteServiceSOAP11port_jms1" binding="axis2:SimpleStockQuoteServiceSOAP11Binding"> <soap:address location="jms:/queue/requestQ?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616"/>
   </wsdl:port>
   ....
6. Now generate the stubs. There is a small bug in the wsdl2java.sh on Linux - so you *may* have to do the following:

[EMAIL PROTECTED]:~/java/axis2-1.2-RC2/bin$ ./axis2.sh org.apache.axis2.wsdl.WSDL2Java -uri http://localhost:8080/axis2/services/SimpleStockQuoteService?wsdl -p asankha -d adb -ss -g -o output

7. I used IDEA and copied the src files in the above output directory into it, and added all the JARs from the axis2/lib folder into the project. Then I wrote the below client (The Idea project is attached - you may need to fix the paths for the libs etc)

public class JMSStubClient {

   public static void main(String[] args) throws Exception  {
SimpleStockQuoteServiceSimpleStockQuoteServiceSOAP11Port_jms1Stub stub = new SimpleStockQuoteServiceSimpleStockQuoteServiceSOAP11Port_jms1Stub();

       PlaceOrder order = new PlaceOrder();
       order.setSymbol("IBM");
       order.setQuantity(100);
       order.setPrice(23.44);
       PlaceOrder1 po = new PlaceOrder1();
       po.setOrder(order);

       try {
           stub.placeOrder(po);
       } catch (RemoteException e) {
           e.printStackTrace();
       }
   }
}

8. Executing the client, I see the following at the client

/opt/j2sdk1.4.2_13/bin/java ..... com.intellij.rt.execution.application.AppMain asankha.JMSStubClient Apr 4, 2007 2:56:36 PM org.apache.axis2.transport.jms.JMSOutTransportInfo getDestination WARNING: Cannot get or lookup JMS destination : queue/requestQ from url : jms:/queue/requestQ?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616 : queue/requestQ
Process finished with exit code 0

and the following at the server
INFO: [SimpleAxisServer] Started
Wed Apr 04 15:26:38 LKT 2007 SimpleStockQuoteService :: Accepted order for : 100 stocks of IBM at $ 23.44

So.. everything seems to be ok for me... Could you confirm this..?

asankha

badrys wrote:
Hi Asankha,

I sent my sample to your email adress (the one with wso2), but I am not sure
if it is the good one.
Please tell me in case you didn't receive my mail.

Badrys.
asankha wrote:


Hi Badrys
Please zip and email me the samples or code I could use to recreate
this issue - please send these directly to me at [EMAIL PROTECTED]  to
avoid posting huge attachments to everyone on this list
asankha
badrys wrote:

  Hi  Asankha, Hi Deepal,

I tested the new RC distirbution with various samples and unfortunately I
am
still having the famous time out exception (30 sec)  with one way
operations.
Actually, to be more specific, I noticed two different situations:

1) If the operation called is supposed to make a punctual action (such as
printing or sending a text message), it does make it ( the action does
happen ) but the client (caller) doesn't exit until the time out
exception.

2) The weird one: If the operation called is supposed to wait for an event
(such as receiving a text message), it is blocked until the time out
exception and doesn't react even if the event happens before the exception
(30 sec seem sufficient to me for receiving a simple text message).
Moreover, it even seems to be blocking the JMS server totally (the samples that worked previously stopped working until I relaunched the JMS server). Have you any explanation for this phenomenon ?
Thanks,
Badrys.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to