From 0f59dce3d7c9f72281e58ad8156c028c15ad87a9 Mon Sep 17 00:00:00 2001 From: Sanjay Dalal Date: Thu, 5 Mar 2009 00:39:08 +0000 Subject: [PATCH] CSPACE-11 initial checkin A src/services/trunk/sandbox/sanjay A src/services/trunk/sandbox/sanjay/prototypes A src/services/trunk/sandbox/sanjay/prototypes/restws A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.classpath A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/nb-configuration.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.project A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/test A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/test/java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/resources A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/resources/person.xsd A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/pom.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.eclipse.jdt.core.prefs A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.maven.ide.eclipse.prefs AM src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/helloworld.war A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nbactions.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.classpath A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nb-configuration.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.project A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/PersonServiceTest.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/resources A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/resources/log4j.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonClient.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonProxy.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/resources A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/temp-testng-customsuite.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/pom.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.eclipse.jdt.core.prefs A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.maven.ide.eclipse.prefs A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/pom.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nbactions.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nb-configuration.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/PersonResourceTest.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/PersonResource.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/entity A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/entity/Person.java A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/resources A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp/WEB-INF A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp/WEB-INF/web.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/build.properties A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/pom.xml A src/services/trunk/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/README.txt --- .../HelloWorld/HelloWorldClient/.classpath | 10 + .../HelloWorld/HelloWorldClient/.project | 23 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.maven.ide.eclipse.prefs | 8 + .../HelloWorldClient/nb-configuration.xml | 20 ++ .../HelloWorld/HelloWorldClient/nbactions.xml | 16 ++ .../HelloWorld/HelloWorldClient/pom.xml | 67 +++++ .../hello/client/PersonClient.java | 86 +++++++ .../hello/client/PersonProxy.java | 39 +++ .../hello/client/PersonServiceTest.java | 73 ++++++ .../src/test/resources/log4j.xml | 45 ++++ .../temp-testng-customsuite.xml | 8 + .../HelloWorld/HelloWorldJaxb/.classpath | 9 + .../restws/HelloWorld/HelloWorldJaxb/.project | 23 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.maven.ide.eclipse.prefs | 8 + .../HelloWorldJaxb/nb-configuration.xml | 20 ++ .../restws/HelloWorld/HelloWorldJaxb/pom.xml | 59 +++++ .../src/main/resources/person.xsd | 32 +++ .../HelloWorld/HelloWorldService/README.txt | 15 ++ .../HelloWorldService/build.properties | 1 + .../HelloWorldService/nb-configuration.xml | 21 ++ .../HelloWorldService/nbactions.xml | 71 ++++++ .../HelloWorld/HelloWorldService/pom.xml | 173 +++++++++++++ .../collectionspace/hello/entity/Person.java | 126 ++++++++++ .../hello/services/HelloworldApplication.java | 24 ++ .../hello/services/PersonResource.java | 199 +++++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 34 +++ .../hello/test/PersonResourceTest.java | 108 ++++++++ .../restws/HelloWorld/helloworld.war | Bin 0 -> 18023 bytes .../prototypes/restws/HelloWorld/pom.xml | 231 ++++++++++++++++++ 31 files changed, 1559 insertions(+) create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.classpath create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.project create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.eclipse.jdt.core.prefs create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.maven.ide.eclipse.prefs create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nb-configuration.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nbactions.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/pom.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonClient.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonProxy.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/PersonServiceTest.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/resources/log4j.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/temp-testng-customsuite.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.classpath create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.project create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.eclipse.jdt.core.prefs create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.maven.ide.eclipse.prefs create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/nb-configuration.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/pom.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/resources/person.xsd create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/README.txt create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/build.properties create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nb-configuration.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nbactions.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/pom.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/entity/Person.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/PersonResource.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp/WEB-INF/web.xml create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/PersonResourceTest.java create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/helloworld.war create mode 100644 sandbox/sanjay/prototypes/restws/HelloWorld/pom.xml diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.classpath b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.classpath new file mode 100644 index 000000000..96f09f11f --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.project b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.project new file mode 100644 index 000000000..f44220ec1 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.project @@ -0,0 +1,23 @@ + + + javaee-addressbook-client + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.maven.ide.eclipse.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.maven.ide.eclipse.maven2Nature + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.eclipse.jdt.core.prefs b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..2a27da414 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +#Thu Feb 26 16:32:51 PST 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.maven.ide.eclipse.prefs b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 000000000..c6e4123cd --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,8 @@ +#Thu Feb 26 16:30:28 PST 2009 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=false +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +version=1 diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nb-configuration.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nb-configuration.xml new file mode 100644 index 000000000..6c3fe600b --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nb-configuration.xml @@ -0,0 +1,20 @@ + + + + + + default + 8 + 80 + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nbactions.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nbactions.xml new file mode 100644 index 000000000..458dbd096 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/nbactions.xml @@ -0,0 +1,16 @@ + + + + rebuild + + * + + + clean + install + + + true + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/pom.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/pom.xml new file mode 100644 index 000000000..080bb2401 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/pom.xml @@ -0,0 +1,67 @@ + + + + helloworld + org.collectionspace.hello.services + 0.1 + + 4.0.0 + org.collectionspace.services.hello + helloworld-client + jar + 0.1 + Helloworld Client + + + org.collectionspace.services.hello + helloworld-jaxb + 0.1 + + + org.testng + testng + 5.6 + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + org.jboss.resteasy + resteasy-jaxrs + 1.0.2.GA + + + + tjws + webserver + + + + + org.jboss.resteasy + resteasy-jaxb-provider + 1.0.2.GA + + + commons-httpclient + commons-httpclient + + + + + + maven-compiler-plugin + 2.0.2 + + 1.5 + 1.5 + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonClient.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonClient.java new file mode 100644 index 000000000..3f05d6a74 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonClient.java @@ -0,0 +1,86 @@ + +package org.collectionspace.hello.client; + +import javax.ws.rs.core.Response; + +import org.jboss.resteasy.client.ProxyFactory; +import org.jboss.resteasy.plugins.providers.RegisterBuiltin; +import org.jboss.resteasy.client.ClientResponse; +import org.jboss.resteasy.spi.ResteasyProviderFactory; + +/** + * A PersonClient. + + * @version $Revision:$ + */ +public class PersonClient +{ + + /** + * + */ + private static final PersonClient instance = new PersonClient(); + + /** + * + */ + private PersonProxy personProxy; + + /** + * + * Create a new PersonClient. + * + */ + private PersonClient() + { + ResteasyProviderFactory factory = ResteasyProviderFactory.getInstance(); + RegisterBuiltin.register(factory); + personProxy = ProxyFactory.create(PersonProxy.class, "http://localhost:8080/helloworld/cspace"); + } + + /** + * FIXME Comment this + * + * @return + */ + public static PersonClient getInstance() + { + return instance; + } + + + + /** + * @param id + * @return + * @see org.collectionspace.hello.client.PersonProxy#getPerson(java.lang.Long) + */ + public ClientResponse getPerson(Long id) + { + return personProxy.getPerson(id); + } + + /** + * @param person + * @return + * @see org.collectionspace.hello.client.PersonProxy#createPerson(org.collectionspace.hello.client.entity.Person) + */ + public ClientResponse createPerson(Person person) + { + return personProxy.createPerson(person); + } + + + /** + * @param id + * @param person + * @return + * @see org.collectionspace.hello.client.PersonProxy#updatePerson(java.lang.Long, org.collectionspace.hello.client.entity.Person) + */ + public ClientResponse updatePerson(Long id, Person person) + { + return personProxy.updatePerson(id, person); + } + + +} diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonProxy.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonProxy.java new file mode 100644 index 000000000..668c1f7fc --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/main/java/org/collectionspace/hello/client/PersonProxy.java @@ -0,0 +1,39 @@ +package org.collectionspace.hello.client; + +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Response; + +import org.jboss.resteasy.client.ClientResponse; + +/** + * @version $Revision:$ + */ +@Path("/persons/") +@Produces({"application/xml"}) +@Consumes({"application/xml"}) +public interface PersonProxy { + + /** + * + * + * @param id + * @return + */ + @GET + @Path("/{id}") + ClientResponse getPerson(@PathParam("id") Long id); + + @POST + ClientResponse createPerson(Person so); + + @PUT + @Path("/{id}") + ClientResponse updatePerson(@PathParam("id") Long id, Person so); +} \ No newline at end of file diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/PersonServiceTest.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/PersonServiceTest.java new file mode 100644 index 000000000..525a086b0 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/java/org/collectionspace/hello/client/PersonServiceTest.java @@ -0,0 +1,73 @@ +package org.collectionspace.hello.client; + +import java.util.ArrayList; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.Marshaller; +import javax.xml.namespace.QName; +import org.collectionspace.hello.client.*; +import org.jboss.resteasy.client.ClientResponse; +import org.testng.Assert; +import org.testng.annotations.Test; + +/** + * A PersonServiceTest. + * + * @version $Revision:$ + */ +public class PersonServiceTest { + + private PersonClient personClient = PersonClient.getInstance(); + private Long id = 0L; + + @Test + public void createPerson() { + Person person = new Person(); + person.setFirstName("Chris"); + person.setLastName("Hoffman"); + person.setStreet("2195 Hearst Ave."); + person.setCity("Berkeley"); + person.setState("CA"); + person.setZip("94704"); + person.setCountry("US"); + ClientResponse res = personClient.createPerson(person); + Assert.assertEquals(res.getStatus(), Response.Status.CREATED.getStatusCode()); + id = extractId(res); + } + + @Test(dependsOnMethods = {"createPerson"}) + public void updatePerson() { + Person me = personClient.getPerson(id).getEntity(); + verbose("received with get", me); + me.setFirstName("Richard"); + me.setLastName("Millet"); + int initialVersion = me.getVersion(); + Person updated = personClient.updatePerson(id, me).getEntity(); + verbose("updated", updated); + Assert.assertNotSame(updated.getVersion(), initialVersion); + Assert.assertEquals(updated.getFirstName(), "Richard"); + } + + private Long extractId(ClientResponse res) { + MultivaluedMap mvm = res.getMetadata(); + String uri = (String) ((ArrayList) mvm.get("Location")).get(0); + String[] segments = uri.split("/"); + System.out.println("id=" + segments[segments.length - 1]); + return Long.valueOf(segments[segments.length - 1]); + } + + private void verbose(String msg, Person p) { + try { + System.out.println(msg); + JAXBContext jc = JAXBContext.newInstance(Person.class); + Marshaller m = jc.createMarshaller(); + m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, + Boolean.TRUE); + m.marshal(new JAXBElement(new QName("uri", "local"), Person.class, p), System.out); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/resources/log4j.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/resources/log4j.xml new file mode 100644 index 000000000..52121cb83 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/src/test/resources/log4j.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/temp-testng-customsuite.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/temp-testng-customsuite.xml new file mode 100644 index 000000000..9f2480621 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldClient/temp-testng-customsuite.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.classpath b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.classpath new file mode 100644 index 000000000..a92b24a87 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.project b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.project new file mode 100644 index 000000000..db1c789f7 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.project @@ -0,0 +1,23 @@ + + + javaee-addressbook-jaxb + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.maven.ide.eclipse.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.maven.ide.eclipse.maven2Nature + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.eclipse.jdt.core.prefs b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..8780c51c5 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +#Thu Feb 26 16:32:52 PST 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.maven.ide.eclipse.prefs b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.maven.ide.eclipse.prefs new file mode 100644 index 000000000..c6e4123cd --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/.settings/org.maven.ide.eclipse.prefs @@ -0,0 +1,8 @@ +#Thu Feb 26 16:30:28 PST 2009 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +includeModules=false +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +version=1 diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/nb-configuration.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/nb-configuration.xml new file mode 100644 index 000000000..6c3fe600b --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/nb-configuration.xml @@ -0,0 +1,20 @@ + + + + + + default + 8 + 80 + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/pom.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/pom.xml new file mode 100644 index 000000000..f73ba8dd2 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/pom.xml @@ -0,0 +1,59 @@ + + + + helloworld + org.collectionspace.hello.services + 0.1 + + 4.0.0 + org.collectionspace.services.hello + helloworld-jaxb + Helloworld Client JAXB + 0.1 + + + com.sun.xml.bind + jaxb-impl + 2.0.2 + + + org.jvnet.jaxb2-commons + property-listener-injector + 1.0 + + + org.jvnet.jaxb2_commons + runtime + 0.4.1.4 + + + + + + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin + + + + javax.activation + activation + 1.1 + + + com.sun.xml.bind + jaxb-impl + 2.1.2 + + + + + maven-compiler-plugin + 2.0.2 + + 1.5 + 1.5 + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/resources/person.xsd b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/resources/person.xsd new file mode 100644 index 000000000..319a72283 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldJaxb/src/main/resources/person.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/README.txt b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/README.txt new file mode 100644 index 000000000..bd38e834c --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/README.txt @@ -0,0 +1,15 @@ + +This project is a simple example showing usage of @Path, @GET, PUT, POST, and @PathParam. It uses pure streaming +output as well. + +System Requirements: +==================== +- Maven 2.0.9 or higher + +Building the project: +==================== +1. In root directoy + +mvn clean install + +This will build a WAR and run it with embedded Jetty \ No newline at end of file diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/build.properties b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/build.properties new file mode 100644 index 000000000..332484b24 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/build.properties @@ -0,0 +1 @@ +jboss.dir=C:/dev/jboss-4.2.3.GA \ No newline at end of file diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nb-configuration.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nb-configuration.xml new file mode 100644 index 000000000..3e5cd988f --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nb-configuration.xml @@ -0,0 +1,21 @@ + + + + + + default + 8 + 80 + false + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nbactions.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nbactions.xml new file mode 100644 index 000000000..c0f982061 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/nbactions.xml @@ -0,0 +1,71 @@ + + + + test + + * + + + test + + + + build + + * + + + install + + + + clean + + * + + + clean + + + + rebuild + + * + + + clean + install + + + + run + + war + ear + ejb + + + package + + + + true + + + + debug + + war + ear + ejb + + + package + + + + true + true + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/pom.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/pom.xml new file mode 100644 index 000000000..ca7743721 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/pom.xml @@ -0,0 +1,173 @@ + + + + helloworld + org.collectionspace.hello.services + 0.1 + + 4.0.0 + org.collectionspace.prototype + helloworld-service + war + 0.1 + Helloworld Service + + + + java.net + http://download.java.net/maven/1 + legacy + + + maven repo + maven repo + http://repo1.maven.org/maven2/ + + + + jboss + jboss repo + http://repository.jboss.org/maven2 + + + mojo + mojo repo + http://svn.codehaus.org/mojo/trunk/mojo/jboss-maven-plugin + + + + + + org.jboss.resteasy + resteasy-jaxrs + 1.0.2.GA + + + + tjws + webserver + + + + + org.jboss.resteasy + resteasy-jaxb-provider + 1.0.2.GA + + + junit + junit + 4.1 + test + + + + + helloworld + + + org.codehaus.mojo + jboss-maven-plugin + + ${jboss.dir} + + + + jboss-undeploy + pre-integration-test + + undeploy + + + ${basedir}/target/helloworld.war + + + + jboss-deploy + pre-integration-test + + deploy + + + ${basedir}/target/helloworld.war + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + surefire-it + integration-test + + test + + + false + + + + + + org.apache.maven.plugins + maven-war-plugin + 2.0 + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/entity/Person.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/entity/Person.java new file mode 100644 index 000000000..bf4fc5096 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/entity/Person.java @@ -0,0 +1,126 @@ +package org.collectionspace.hello.entity; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.Unmarshaller.Listener; +import javax.xml.bind.annotation.XmlElement; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "person", propOrder = { + "firstName", + "lastName", + "street", + "city", + "state", + "zip", + "country" +}) +public class Person extends Listener { + + @XmlAttribute + private int id; + @XmlAttribute + private int version = 1; + private String firstName; + private String lastName; + private String street; + private String city; + private String state; + private String zip; + private String country; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + /** + * @return the version + */ + public int getVersion() { + return version; + } + + /** + * @param version the version to set + */ + public void setVersion(int version) { + this.version = version; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getStreet() { + return street; + } + + public void setStreet(String street) { + this.street = street; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + /** + * JAXB Callback method used to reassociate the item with the owning contact. + * JAXB doesn't seem to read this method from a super class and it must + * therefore be placed on any subclass. + * + * @param unmarshaller the JAXB {@link Unmarshaller}. + * @param parent the owning {@link Contact} instance. + */ + public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { + super.afterUnmarshal(unmarshaller, parent); + } +} diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java new file mode 100644 index 000000000..0021b9ae5 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/HelloworldApplication.java @@ -0,0 +1,24 @@ +package org.collectionspace.hello.services; + +import javax.ws.rs.core.Application; +import java.util.HashSet; +import java.util.Set; + +public class HelloworldApplication extends Application { + private Set singletons = new HashSet(); + private Set> empty = new HashSet>(); + + public HelloworldApplication() { + singletons.add(new PersonResource()); + } + + @Override + public Set> getClasses() { + return empty; + } + + @Override + public Set getSingletons() { + return singletons; + } +} diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/PersonResource.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/PersonResource.java new file mode 100644 index 000000000..7afccdf92 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/java/org/collectionspace/hello/services/PersonResource.java @@ -0,0 +1,199 @@ +package org.collectionspace.hello.services; + +import org.collectionspace.hello.entity.Person; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Response; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; +import javax.ws.rs.core.UriBuilder; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Marshaller; + +@Path("/persons") +@Consumes("application/xml") +@Produces("application/xml") +public class PersonResource { + + private Map personDB = new ConcurrentHashMap(); + private AtomicInteger idCounter = new AtomicInteger(); + + public PersonResource() { + } + + @POST + public Response createPerson(Person p) { + p.setId(idCounter.incrementAndGet()); + p.setVersion(1); + personDB.put(p.getId(), p); + verbose("create person", p); + UriBuilder path = UriBuilder.fromResource(PersonResource.class); + path.path("" + p.getId()); + Response response = Response.created(path.build()).build(); + return response; + } + + @GET + @Path("{id}") + public Person getPerson(@PathParam("id") int id) { + Person p = personDB.get(id); + if (p == null) { + Response response = Response.status(Response.Status.NOT_FOUND).entity( + "The requested ID was not found.").type("text/plain").build(); + throw new WebApplicationException(response); + } + verbose("get person", p); + return p; + } + + @PUT + @Path("{id}") + public Person updatePerson(@PathParam("id") int id, Person update) { + Person current = personDB.get(id); + if (current == null) { + throw new WebApplicationException(Response.Status.NOT_FOUND); + } + verbose("received person", update); + //todo: intelligent merge needed + current.setFirstName(update.getFirstName()); + current.setLastName(update.getLastName()); + current.setStreet(update.getStreet()); + current.setState(update.getState()); + current.setZip(update.getZip()); + current.setCountry(update.getCountry()); + current.setVersion(current.getVersion() + 1); + verbose("updated person", current); + return current; + } + + private void verbose(String msg, Person p) { + try { + System.out.println(msg); + JAXBContext jc = JAXBContext.newInstance(Person.class); + Marshaller m = jc.createMarshaller(); + m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, + Boolean.TRUE); + m.marshal(p, System.out); + } catch (Exception e) { + e.printStackTrace(); + } + } + +// @POST +// @Consumes("application/xml") +// public Response createPerson(InputStream is) { +// Person p = readPerson(is); +// p.setId(idCounter.incrementAndGet()); +// p.setVersion(1); +// personDB.put(p.getId(), p); +// try { +// System.out.println("Created Person " + p.getId()); +// outputPerson(System.out, p); +// } catch (IOException ioe) { +// throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR); +// } +// return Response.created(URI.create("/persons/" + p.getId())).build(); +// +// } +// +// @GET +// @Path("{id}") +// @Produces("application/xml") +// public StreamingOutput getPerson(@PathParam("id") int id) { +// final Person p = personDB.get(id); +// if (p == null) { +// throw new WebApplicationException(Response.Status.NOT_FOUND); +// } +// return new StreamingOutput() { +// +// public void write(OutputStream outputStream) throws IOException, WebApplicationException { +// outputPerson(outputStream, p); +// } +// }; +// } +// +// @PUT +// @Path("{id}") +// @Consumes("application/xml") +// @Produces("application/xml") +// public StreamingOutput updatePerson(@PathParam("id") int id, InputStream is) { +// Person update = readPerson(is); +// Person current = personDB.get(id); +// if (current == null) { +// throw new WebApplicationException(Response.Status.NOT_FOUND); +// } +// +// current.setFirstName(update.getFirstName()); +// current.setLastName(update.getLastName()); +// current.setStreet(update.getStreet()); +// current.setState(update.getState()); +// current.setZip(update.getZip()); +// current.setCountry(update.getCountry()); +// current.setVersion(current.getVersion() + 1); +// final Person scurrent = current; +// return new StreamingOutput() { +// +// public void write(OutputStream outputStream) throws IOException, WebApplicationException { +// outputPerson(outputStream, scurrent); +// } +// }; +// } +// +// protected void outputPerson(OutputStream os, Person p) throws IOException { +// PrintStream writer = new PrintStream(os); +// writer.println(""); +// writer.println(" " + p.getFirstName() + ""); +// writer.println(" " + p.getLastName() + ""); +// writer.println(" " + p.getStreet() + ""); +// writer.println(" " + p.getCity() + ""); +// writer.println(" " + p.getState() + ""); +// writer.println(" " + p.getZip() + ""); +// writer.println(" " + p.getCountry() + ""); +// writer.println(""); +// } +// +// protected Person readPerson(InputStream is) { +// try { +// DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); +// Document doc = builder.parse(is); +// Element root = doc.getDocumentElement(); +// Person p = new Person(); +// if (root.getAttribute("id") != null && !root.getAttribute("id").trim().equals("")) { +// p.setId(Integer.valueOf(root.getAttribute("id"))); +// } +// if (root.getAttribute("version") != null && !root.getAttribute("version").trim().equals("")) { +// p.setVersion(Integer.valueOf(root.getAttribute("version"))); +// } +// NodeList nodes = root.getChildNodes(); +// for (int i = 0; i < nodes.getLength(); i++) { +// Element element = (Element) nodes.item(i); +// if (element.getTagName().equals("first-name")) { +// p.setFirstName(element.getTextContent()); +// } else if (element.getTagName().equals("last-name")) { +// p.setLastName(element.getTextContent()); +// } else if (element.getTagName().equals("street")) { +// p.setStreet(element.getTextContent()); +// } else if (element.getTagName().equals("city")) { +// p.setCity(element.getTextContent()); +// } else if (element.getTagName().equals("state")) { +// p.setState(element.getTextContent()); +// } else if (element.getTagName().equals("zip")) { +// p.setZip(element.getTextContent()); +// } else if (element.getTagName().equals("country")) { +// p.setCountry(element.getTextContent()); +// } +// } +// return p; +// } catch (Exception e) { +// throw new WebApplicationException(e, Response.Status.BAD_REQUEST); +// } +// } +} diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp/WEB-INF/web.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000..eb42428a2 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,34 @@ + + + + Helloworld + + + javax.ws.rs.Application + org.collectionspace.hello.services.HelloworldApplication + + + + resteasy.servlet.mapping.prefix + /cspace + + + + + org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap + + + + + Resteasy + + org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher + + + + + Resteasy + /cspace/* + + + diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/PersonResourceTest.java b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/PersonResourceTest.java new file mode 100644 index 000000000..7757b15dd --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/HelloWorldService/src/test/java/org/collectionspace/hello/test/PersonResourceTest.java @@ -0,0 +1,108 @@ +package org.collectionspace.hello.test; + +import org.junit.Assert; +import org.junit.Test; +import org.apache.commons.httpclient.HttpMethodBase; +import org.apache.commons.httpclient.HttpClient; +import org.apache.commons.httpclient.methods.EntityEnclosingMethod; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; + + +/** + * @author Bill Burke + * @version $Revision: 1 $ + */ +public class PersonResourceTest +{ + @Test + public void testPersonResource() throws Exception + { + System.out.println("*** Create a new Person ***"); + // Create a new object + String newPerson = "" + + "John" + + "Doe" + + "2195 Hearst Ave" + + "Berkeley" + + "CA" + + "94504" + + "USA" + + ""; + + URL postUrl = new URL("http://localhost:8080/helloworld/cspace/persons"); + HttpURLConnection connection = (HttpURLConnection) postUrl.openConnection(); + connection.setDoOutput(true); + connection.setInstanceFollowRedirects(false); + connection.setRequestMethod("POST"); + connection.setRequestProperty("Content-Type", "application/xml"); + OutputStream os = connection.getOutputStream(); + os.write(newPerson.getBytes()); + os.flush(); + Assert.assertEquals(HttpURLConnection.HTTP_CREATED, connection.getResponseCode()); + String createdUrl = connection.getHeaderField("Location"); + System.out.println("Location: " + createdUrl); + connection.disconnect(); + + + // Get the new object + System.out.println("*** GET Created Person **"); + URL getUrl = new URL(createdUrl); + connection = (HttpURLConnection) getUrl.openConnection(); + connection.setRequestMethod("GET"); + System.out.println("Content-Type: " + connection.getContentType()); + + BufferedReader reader = new BufferedReader(new + InputStreamReader(connection.getInputStream())); + + String line = reader.readLine(); + while (line != null) + { + System.out.println(line); + line = reader.readLine(); + } + Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode()); + connection.disconnect(); + + String updatePerson = "" + + "Jane" + + "Doe" + + "1 University Ave" + + "Berkeley" + + "CA" + + "94504" + + "USA" + + ""; + connection = (HttpURLConnection) getUrl.openConnection(); + connection.setDoOutput(true); + connection.setRequestMethod("PUT"); + connection.setRequestProperty("Content-Type", "application/xml"); + os = connection.getOutputStream(); + os.write(updatePerson.getBytes()); + os.flush(); + Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode()); + connection.disconnect(); + + // Show the update + System.out.println("**** After Update ***"); + connection = (HttpURLConnection) getUrl.openConnection(); + connection.setRequestMethod("GET"); + + System.out.println("Content-Type: " + connection.getContentType()); + reader = new BufferedReader(new + InputStreamReader(connection.getInputStream())); + + line = reader.readLine(); + while (line != null) + { + System.out.println(line); + line = reader.readLine(); + } + Assert.assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode()); + connection.disconnect(); + } +} diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/helloworld.war b/sandbox/sanjay/prototypes/restws/HelloWorld/helloworld.war new file mode 100644 index 0000000000000000000000000000000000000000..1ca2b18c0f9cee04f6b1fc2a128cf5c24b475ea7 GIT binary patch literal 18023 zcmb_@1z23k5-#rU?ykXI26uONx8R=O?(Po3o!}7MAy{xva0?nB@W|cGW;eTc-`jon z@G&!dbk%=OO?7oucl`>|pkOdS-!41@WA6Wa`1J+)`CV321wbz;C&sAo>o6!F+~;BW zriXTS&;PCf1_DC+{V-X8oTQkjvI>K&m})G*u9pZ&^hRRE5B9YU$4O6HVT4o?iRqjz zTMsHOWI#U>ZKqGIWxUz_ zA~qilE&F^yRtq?LBBSej=N6h@f^c+C`-5k^r0rT7ZQa&I7cfoIqC*-+?dwD)_8^)f zfoukkmlRPwaH@uYA|Xv3qoshW?;lEAsF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DCFI%I2M*X>y<_GFE z!M{TNo4%T#v43u^_<^lY{I9V8y4B)m*q@Knf57gL{x4vEJzW18_UA*>AFwVI{{z@x zj!=IO`d9lLKR`L2*PZW9{OhjA58*#28Q;q4U#@S9D>&Ql(v>t9+ ze-{4xTK4bmOYpnq|D+K<|5Wu~l*vEPpn(3W4F3*T=(qeoK>M{Q|2^nm<vZ~f;2e9H~sj}KXcEytvAoNzy1$31RBu* literal 0 HcmV?d00001 diff --git a/sandbox/sanjay/prototypes/restws/HelloWorld/pom.xml b/sandbox/sanjay/prototypes/restws/HelloWorld/pom.xml new file mode 100644 index 000000000..b26a1d350 --- /dev/null +++ b/sandbox/sanjay/prototypes/restws/HelloWorld/pom.xml @@ -0,0 +1,231 @@ + + + + 4.0.0 + org.collectionspace.hello.services + 0.1 + helloworld + pom + HelloWorld + + HelloWorldService + HelloWorldJaxb + HelloWorldClient + + + + jboss + http://repository.jboss.org/maven2 + + + sun + http://download.java.net/maven/2 + + + java.net + java.net Maven Repository + + https://maven-repository.dev.java.net/nonav/repository + + legacy + + + maven2-repository.dev.java.net + Java.net Maven 2 Repository + http://download.java.net/maven/2 + + + + + + java.net + java.net Maven Repository + + https://maven-repository.dev.java.net/nonav/repository + + legacy + + + maven2-repository.dev.java.net + Java.net Maven 2 Repository + http://download.java.net/maven/2 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + + + + org.apache.maven.plugins + maven-site-plugin + + + /usr/bin/unzip -o > err.txt + + + + + org.apache.maven.plugins + maven-war-plugin + 2.0.1 + + + + WEB-INF/lib/*.jar + + + + true + + + + + + + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin + + + + generate + + + + + + -XtoString + -Xinject-listener-code + + + + + + + org.jvnet.jaxb2_commons + + basic + 0.4.1 + + + + org.jvnet.jaxb2-commons + + + property-listener-injector + + 1.0 + + + + + org.collectionspace.hello.client + + + + + + + + + + net.java.dev.jaxb2-commons + jaxb-fluent-api + 2.0.1 + + + org.testng + testng + 5.6 + test + jdk15 + + + org.jboss.resteasy + jaxrs-api + 1.0.2.GA + + + net.java.dev.jaxb2-commons + jaxb-fluent-api + 2.0.1 + + + org.jvnet.jaxb2-commons + property-listener-injector + 1.0 + + + org.jvnet.jaxb2_commons + runtime + 0.4.1 + + + org.jboss.resteasy + resteasy-jaxrs + 1.0.2.GA + + + commons-httpclient + commons-httpclient + 3.1 + + + com.sun.xml.bind + jaxb-impl + 2.1.7 + + + org.testng + testng + 5.6 + test + jdk15 + + + org.slf4j + slf4j-api + 1.5.2 + + + org.slf4j + slf4j-log4j12 + 1.5.2 + + + mysql + mysql-connector-java + 5.1.5 + test + + + com.jgoodies + binding + 2.0.2 + + + com.jgoodies + forms + 1.2.0 + + + + -- 2.47.3