// 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.WebService;

@WebService(serviceName = "TestService",
            portName = "TestPort",
            targetNamespace = "http://soap.ws",
            wsdlLocation = "WEB-INF/Test.wsdl",
            endpointInterface = "ws.soap.TestPort")
public class TestPortImpl implements TestPort {
	public T1 getOne(int f1) {
    	// dummy implementation
		return new T1(f1, "getOne");
	}
	public ArrayOfT1 getAll() {
    	// dummy implementation
	    ArrayOfT1 res = new ArrayOfT1();
		res.getItem().add(new T1(1, "getAll #1"));
		res.getItem().add(new T1(2, "getAll #2"));
		res.getItem().add(new T1(3, "getAll #3"));
	    return res;
	}
    public boolean save(int f1, String f2) {
    	// dummy implementation
      	return f1 > 0 && f2.length() > 0;
    }
    public boolean saveObject(T1 o) {
    	// dummy implementation
    	return o.getF1() > 0 && o.getF2().length() > 0;
    }
    public boolean delete(int f1) {
    	// dummy implementation
    	return f1 > 0;
    }
}
