// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package ws.client;

import javax.xml.rpc.*;

import ws.server.*;
import ws.stub.*;

public class TestTest {
    public static void main(String[] args) throws Exception {
        NameValuePair[] nvp = new NameValuePair[2];
        nvp[0] = new NameValuePair();
        nvp[0].setName("nam1");
        nvp[0].setValue("val1");
        nvp[1] = new NameValuePair();
        nvp[1].setName("nam2");
        nvp[1].setValue("val2");
        TestUserService service = new TestUserServiceLocator();
        TestUser tst = service.getTestUserService();
        ((Stub)tst)._setProperty(Stub.USERNAME_PROPERTY, "arne");
        ((Stub)tst)._setProperty(Stub.PASSWORD_PROPERTY, "secret");
        NameValuePair[] res = tst.execute(nvp);
        for(int i = 0; i < res.length; i++) {
            System.out.println(res[i].getName() + " = " + res[i].getValue());
        }
    }
}
