users@jax-rpc.java.net

jax-rpc; a basic request

From: Atif Ahmad <bj93004_at_binghamton.edu>
Date: Thu, 20 Mar 2003 15:55:58 -0500

Hi,
 
I am new to web jax-rpc and have a basic question. It is about the input parameters of the methods that we are invoking. I.e. in most of the documents on java.sun.com, we create a web service and thus know the input requirements of the remote methods. In cases where we only have a WSDL file, we would not have information about the parameter requirements of the remote methods that have been documented in the WSDL file. For example, the sample code given in the jax-rpc tutorial (http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXRPC3.html#63872) invokes a remote method "sayHello". We had earlier defined the web service and therefore knew that it takes a string as a parameter.
 The source code for HelloClient follows:

package hello;

import javax.xml.rpc.Stub;

public class HelloClient {
    public static void main(String[] args) {
        try {
            Stub stub = createProxy();
            HelloIF hello = (HelloIF)stub;
            System.out.println(hello.sayHello("Duke!"));
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    private static Stub createProxy() {
        // Note: MyHello_Impl is implementation-specific.
        return (Stub)(new MyHello_Impl().getHelloIFPort());
    }
}
 
 
How and where can we obtain this information about the parameter requirements? Is there any other way of finding out the names of the remote methods other than reading them from the WSDL file?
Thanks a lot,Atif Ahmadatif.ahmad_at_binghamton.edu