jax-rpc performance problems

From: Onur Sencer <>
Date: Mon, 4 Oct 2004 13:49:21 +0300

Hi, I implemented a static stub client, and invoked a web service. On runtime, It takes 3 seconds to perform functions up to invoking of hello.sayHello() function. Also invoking of sayHello function takes 3 seconds. So, calling a web service takes 6 seconds in this example. Don't you think this is too much (especially the first part up to the invoking of the service) ? Is there a better way that takes less time to invoke a service? The code is below. (this is the example on the tutorial)


public class StaticStubHello {

    private String endpointAddress;
    public static void main(String[] args) {
        String endPt="http://localhost:8080/jaxrpc-HelloWorld/hello";
        System.out.println("Endpoint address = "+ endPt);
        try {
            long t1=System.currentTimeMillis();
            Stub stub = createProxy();

            HelloIF hello = (HelloIF) stub;
            long t2=System.currentTimeMillis();
            String result= hello.sayHello("Duke!");
            long t3=System.currentTimeMillis();
            System.out.println(result + " "+(t2-t1)+" "+(t3-t2));
        } catch (Exception ex) {

    private static Stub createProxy() {
        // Note: MyHelloService_Impl is implementation-specific.
        HelloWorldService_Impl x=new HelloWorldService_Impl();
        return (Stub) (x.getHelloIFPort());

To unsubscribe, e-mail:
For additional commands, e-mail: