// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package ws.soap;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

@WebService(targetNamespace="http://soap.ws")
@SOAPBinding(style=SOAPBinding.Style.RPC,use=SOAPBinding.Use.LITERAL)
public class Test {
    @WebMethod
    public T1 getOne(int f1) {
        // dummy implementation
        return new T1(f1, "getOne");
    }
    @WebMethod
    public T1[] getAll() {
        // dummy implementation
        T1[] res = new T1[3];
        res[0] = new T1(1, "getAll #1");
        res[1] = new T1(2, "getAll #2");
        res[2] = new T1(3, "getAll #3");
        return res;
    }
    @WebMethod
    public boolean save(int f1, String f2) {
        // dummy implementation
        return f1 > 0 && f2.length() > 0;
    }
    @WebMethod
    public boolean saveObject(T1 o) {
        // dummy implementation
        return o.getF1() > 0 && o.getF2().length() > 0;
    }
    @WebMethod
    public boolean delete(int f1) {
        // dummy implementation
        return f1 > 0;
    }
}
