From 5a7ebf9ddf7c1c0d369c9a3f31488978de8e5746 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Wed, 23 Feb 2011 21:25:17 +0000 Subject: [PATCH] CSPACE-3574: Missing merged code from the POX branch. Not sure why this did not come (was not brought?) over from the POX branch. --- services/organization/sample/pom.xml | 2 +- services/organization/sample/sample/pom.xml | 8 ++++---- .../services/person/client/sample/Sample.java | 3 ++- services/vocabulary/sample/sample/pom.xml | 8 ++++---- .../services/vocabulary/client/sample/Sample.java | 3 +++ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/services/organization/sample/pom.xml b/services/organization/sample/pom.xml index 9a991a1d1..7b0c6509a 100644 --- a/services/organization/sample/pom.xml +++ b/services/organization/sample/pom.xml @@ -4,7 +4,7 @@ org.collectionspace.services org.collectionspace.services.organization.client.samples pom - 1.0 + 1.5-SNAPSHOT organization.client.samples diff --git a/services/organization/sample/sample/pom.xml b/services/organization/sample/sample/pom.xml index 86969629c..effb40815 100644 --- a/services/organization/sample/sample/pom.xml +++ b/services/organization/sample/sample/pom.xml @@ -4,24 +4,24 @@ org.collectionspace.services org.collectionspace.services.organization.client.sample jar - 1.0 + 1.5-SNAPSHOT organization.client.sample org.collectionspace.services org.collectionspace.services.organization.jaxb - 1.5-SNAPSHOT + ${project.version} org.collectionspace.services org.collectionspace.services.client - 1.5-SNAPSHOT + ${project.version} org.collectionspace.services org.collectionspace.services.organization.client - 1.5-SNAPSHOT + ${project.version} diff --git a/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java b/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java index bf7cc9856..3ff81ae99 100644 --- a/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java +++ b/services/person/sample/sample/src/main/java/org/collectionspace/services/person/client/sample/Sample.java @@ -37,6 +37,7 @@ import org.apache.log4j.BasicConfigurator; import org.collectionspace.services.PersonJAXBSchema; import org.collectionspace.services.client.PersonAuthorityClient; import org.collectionspace.services.client.PersonAuthorityClientUtils; +import org.collectionspace.services.client.PoxPayloadIn; import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.client.test.ServiceRequestType; import org.collectionspace.services.person.PersonauthoritiesCommon; @@ -225,7 +226,7 @@ public class Sample { throw new RuntimeException("Unexpected Status when reading " + "personAuthority, Status:"+ statusCode); } - PoxPayloadIn input = (PoxPayloadIn) res.getEntity(); + PoxPayloadIn input = new PoxPayloadIn(res.getEntity()); personAuthority = (PersonauthoritiesCommon) extractPart(input, client.getCommonPartName(), PersonauthoritiesCommon.class); } catch (Exception e) { diff --git a/services/vocabulary/sample/sample/pom.xml b/services/vocabulary/sample/sample/pom.xml index 37191750f..17fd4c494 100644 --- a/services/vocabulary/sample/sample/pom.xml +++ b/services/vocabulary/sample/sample/pom.xml @@ -4,24 +4,24 @@ org.collectionspace.services org.collectionspace.services.vocabulary.client.sample jar - 1.0 + 1.5-SNAPSHOT vocabulary.client.sample org.collectionspace.services org.collectionspace.services.vocabulary.jaxb - 1.5-SNAPSHOT + ${project.version} org.collectionspace.services org.collectionspace.services.client - 1.5-SNAPSHOT + ${project.version} org.collectionspace.services org.collectionspace.services.vocabulary.client - 1.5-SNAPSHOT + ${project.version} diff --git a/services/vocabulary/sample/sample/src/main/java/org/collectionspace/services/vocabulary/client/sample/Sample.java b/services/vocabulary/sample/sample/src/main/java/org/collectionspace/services/vocabulary/client/sample/Sample.java index 7a8aa8839..ee006622b 100644 --- a/services/vocabulary/sample/sample/src/main/java/org/collectionspace/services/vocabulary/client/sample/Sample.java +++ b/services/vocabulary/sample/sample/src/main/java/org/collectionspace/services/vocabulary/client/sample/Sample.java @@ -336,6 +336,8 @@ public class Sample { private Object extractPart(PoxPayloadIn input, String label, Class clazz) throws Exception { Object obj = null; + obj = input.getPart(label); + /* for(PayloadInputPart part : input.getParts()){ String partLabel = part.getHeaders().getFirst("label"); if(label.equalsIgnoreCase(partLabel)){ @@ -350,6 +352,7 @@ public class Sample { break; } } + */ return obj; } -- 2.47.3