-----Original Message-----
From: Trieu, Jason T - CNF [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:09 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Slow instantiation of the Service class in clientBrian,Your test shows that I might have an issue with AXIS running on AIX. The 8 seconds is the time it took for "Service sv = new Service();" alone. The time to send to the server & back is another 4 seconds. I also ran my client without the service installed and still 8 seconds to create the Service object. Sounds like I am having the same issue Tony had. Instantiating the Call object is very fast but not so for Service. Though unlike Tony's, my client is a standalone client.Jason-----Original Message-----
From: Brian Ko [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 12:20 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Slow instantiation of the Service class in clientI am a newbie in Axis. But I am also working on message style service.I tested your program (without service installed) in window 2000 environment but the response was much quicker than 8 seconds. That may mean that the slowness is from your service, not the client. If you can share your service class code and wsdd file, I am willing to test it here.Brian Ko
-----Original Message-----
From: Trieu, Jason T - CNF [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 12:02 PM
To: '[EMAIL PROTECTED]'
Subject: Slow instantiation of the Service class in clientI am developing a test message-style AXIS client & server and notice that the client takes about 8 seconds for the client to instantiate the Service class on an IBM RS6000 AIX4.3 machine. Is this quite normal or am I doing something wrong? I used the provided sample code for message-style clients to create mine. Below is the code. Appreciate any insight in this.
---------------------------------------------------------------------------------------------------------------------------
package ping.client;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.apache.axis.client.*;
import org.apache.axis.message.*;
import org.apache.axis.utils.*;
import java.io.*;
import java.text.*;
import java.net.URL;
import java.util.*;public class pingClient {
public void sendIt(String args[]) throws Exception {
String endpointURL = "http://"+args[0]+":8080/axis/services/pingService";
// Create Call object (via Service) to call server
// ****** This statement takes 8 seconds to complete *************
Service sv = new Service();
Call call = (Call) sv.createCall();
call.setTargetEndpointAddress(new URL(endpointURL));
// Create a SOAP body elements to send to server
SOAPBodyElement[] Selems = new SOAPBodyElement[2];// Build DOM Document via Factory and builder
DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = fact.newDocumentBuilder();// Now create DOM doc to use for creating DOM elements
Document DOMdoc = builder.newDocument();// Create SOAP element using DOM doc
Element ping = DOMdoc.createElementNS("cnf:dms","PING");
org.w3c.dom.Text pingdata = DOMdoc.createTextNode("are you there?");
ping.appendChild(pingdata);
Selems[0] = new SOAPBodyElement(ping);// Create SOAP element using XMLUtils
Selems[1] = new SOAPBodyElement(XMLUtils.StringToElement("cnf:dms",
"PONG","let me know"));
// Call the sever
Vector resp = (Vector) call.invoke(Selems);// Get SOAP elemements and DOM elements
SOAPBodyElement retSOAPel = null;
Element retDOMel = null;for (int i = 0; i<resp.size();i++) {
retSOAPel = (SOAPBodyElement) resp.get(i);
retDOMel = retSOAPel.getAsDOM();
System.out.println("Element "+i+": "+XMLUtils.ElementToString(retDOMel));
}
}
public static void main(String[] args) throws Exception {
if (args.length < 1) {
System.out.println("Bad Host");
System.exit(1);
}(new pingClient()).sendIt(args);
}
} // End of class
Title: Message
Jason,
Just
as Tony said, I tested your class in stand alone environment (dos prompt). It
took a few second. I think most of the time was for waiting for time out as the
service was not deployed at all. That means your client was ok in my win 2000
environment.
Brian
- Slow instantiation of the Service class in client Trieu, Jason T - CNF
- RE: Slow instantiation of the Service class in... Brian Ko
- RE: Slow instantiation of the Service class in... Anecito, Anthony (HQP)
- RE: Slow instantiation of the Service class in... Trieu, Jason T - CNF
- RE: Slow instantiation of the Service class in... Anecito, Anthony (HQP)
- Brian Ko
