// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import java.rmi.RemoteException;
import javax.xml.rpc.ServiceException;

import ws.soap.T1;
import ws.soap.Test; // modified
import ws.soap.TestServiceLocator; // modified

public class TestClientNewJ {
    public static void main(String[] args) throws RemoteException, ServiceException {
        TestServiceLocator factory = new TestServiceLocator(); // modified
        Test soap = factory.getTestPort(); // modified
        T1 o = soap.getOne(123);
        System.out.println(o.getF1() + " " + o.getF2());
        T1[] all = soap.getAll();
        for(T1 one : all) {
            System.out.println(one.getF1() + " " + one.getF2());
        }
        System.out.println(soap.save(123, "ABC"));
        System.out.println(soap.saveObject(o));
        System.out.println(soap.delete(123));
    }
}
