From: Sanjay Dalal Date: Thu, 5 Mar 2009 00:39:08 +0000 (+0000) Subject: CSPACE-11 initial checkin X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=0f59dce3d7c9f72281e58ad8156c028c15ad87a9;p=tmp%2Fjakarta-migration.git 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 --- 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 000000000..1ca2b18c0 Binary files /dev/null and b/sandbox/sanjay/prototypes/restws/HelloWorld/helloworld.war differ 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 + + + +