Hi all, Without response, I've tried to write a third client, using WSDL2Java. My new client now looks like this :
RbServiceLocator service = new RbServiceLocator(); Rb rbStub = service.getrpcrouter(); ((RbStub) rbStub).setUsername("web_user"); ((RbStub) rbStub).setPassword("web_password"); resp = rbStub.listCard("code=90", "10"); Unfortunately, the first call is still during 15 seconds (but the subsequent calls are good, about 2 seconds). Could you please tell me if this is normal ? What is a "normal time" for the fist call ? In a webapp environment, what is the best way to build the stub for the client ? Best regards, Bernard --- Bernard LUPIN <[EMAIL PROTECTED]> a écrit : > Hi all, > > I'm writing a client that will query web services > already developped with Apache Soap 2.3.1. > I tested two versions of my client, one with Apache > Soap 2.3.1 and one with Axis 1.2RC1. > The return values are good with both clients, but > the > execution time is 3 seconds with Soap 2.3.1, and 15 > seconds with Axis 1.2, so it is five times longer ! > > My two questions are : > - Is it a good practice to use Axis to query an > apache > Soap 2.3.1 service ? > - Is something wrong in my client ? > > Here is the code of my Axis client. If necessary, I > can publish the code of my Apache soap client. > > public class ClientSoapV2 { > public static void main(String[] args) { > long debut = System.currentTimeMillis(); > long fin; > try { > URL url; > url = new > URL("http://my_host:8080/soap/servlet/rpcrouter"); > Service service = new Service(); > Call call = (Call) service.createCall(); > call.setUsername("web_user"); > call.setPassword("web_password"); > call.setTargetEndpointAddress(url); > call.setOperationName( new > QName("urn:ReturnServicesSoap", "listCard") ); > call.addParameter("filter", XMLType.XSD_STRING, > ParameterMode.IN); > call.addParameter("nbLignes", XMLType.XSD_STRING, > ParameterMode.IN); > call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING > ); > String ret = (String) call.invoke( new Object[] { > "code=90", "10" } ); > fin = System.currentTimeMillis(); > System.out.println("Resul : \n" + ret); > } catch (Exception e) { > System.err.println(e.toString()); > } > fin = System.currentTimeMillis(); > System.out.println("Elapsed time:" + (fin-debut)); > } > > Thanks in advance ! > Bernard > > > > > > > > Vous manquez d’espace pour stocker vos mails ? > Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! > Créez votre Yahoo! Mail sur > http://fr.benefits.yahoo.com/ > > Le nouveau Yahoo! Messenger est arrivé ! Découvrez > toutes les nouveautés pour dialoguer instantanément > avec vos amis. A télécharger gratuitement sur > http://fr.messenger.yahoo.com > Vous manquez d’espace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com