Hello!
I have a simple service that adds two positive integers and returns the 
result.If a negative value is inserted a java.lang.Exception() is thrown.
The service class file MyTest.java looks like:
 
package mytest;
public class MyTest {    public MyTest() {    }
    public int addPositiveValues (int value1, int value2) throws Exception {    
   if(value1 <= 0) {          throw(new Exception());       }       if(value2 
<= 0) {          throw(new Exception());       }
       return(value1 + value2);    }}
 
The services.xml looks like:
 
<service name="MyTest" scope="application">    <description>        This is a 
webservice for MyTest    </description>    <messageReceivers>        
<messageReceiver mep='http://www.w3.org/2004/08/wsdl/in-out'                    
     class='org.apache.axis2.rpc.receivers.RPCMessageReceiver'/>    
</messageReceivers>    <parameter name='ServiceClass' 
locked='false'>mytest.MyTest</parameter></service>
Then I generate an Axis2 1.3 wsdl2java client, xmlbeans style.
I init my client and sets the property HTTPConstants.REUSE_HTTP_CLIENT to 
Boolean.TRUE:Options options = 
stub._getServiceClient().getOptions();options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
 Boolean.TRUE);      Then I call my service with arguments that causes an 
exception (value1=-1, value2=-1) several times.stub.addPositiveValues(...);
The first call by the client works fine and an exception is caught in my client 
the way it should.The second call works fine too and an exception is caught in 
my client.But the third time it just hangs after executing the call. Waits 
forever... The method stub.addPositiveValues(...) never returns or throw an 
exception.
 
One interesting thing is that when I do these three calls with 
HTTPConstants.REUSE_HTTP_CLIENT = Boolean.FALSE it works fine.
 
I hope this is enough information to easy reproduce this case.I am using 
Windows Vista, Tomcat 6.0 and Java 1.6. or Windows XP, Tomcat 6.0 and Java 1.5
 
What do you think?
 
/Pär
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Reply via email to