From eddfe79274aa52c4721b99f97af17aa93243b558 Mon Sep 17 00:00:00 2001 From: Laramie Crocker Date: Thu, 28 Apr 2011 15:34:59 +0000 Subject: [PATCH] CSPACE-3908 --- .../test-data/xmlreplay/dev-master.xml | 11 +- .../test-data/xmlreplay/loanout/1.xml | 18 +++ .../test-data/xmlreplay/loanout/loanout.xml | 19 +++ .../xmlreplay/objectexit/object-exit.xml | 28 +++++ .../test-data/xmlreplay/objectexit/oe35.xml | 10 ++ .../xmlreplay/objectexit/res/oe17.res.xml | 14 ++- .../xmlreplay/objectexit/res/oe35.res.xml | 13 ++ .../test-data/xmlreplay/xml-replay-master.xml | 6 +- .../collectionspace/tenant-bindings.xml | 112 ++++++++++-------- .../services/common/ReflectionMapper.java | 4 + .../services/common/ResourceBase.java | 27 +++-- .../nuxeo/client/java/DocHandlerBase.java | 34 +++++- .../services/loanin/LoaninResource.java | 22 +--- .../services/client/ObjectExitClient.java | 11 +- .../services/client/ObjectExitProxy.java | 10 +- .../client/test/ObjectExitServiceTest.java | 33 +++++- .../src/main/resources/objectexit_common.xsd | 32 ++++- 17 files changed, 303 insertions(+), 101 deletions(-) create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/1.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/loanout.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/oe35.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe35.res.xml diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/dev-master.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/dev-master.xml index 8d9a52ecf..56e80ff96 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/dev-master.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/dev-master.xml @@ -12,7 +12,7 @@ http://localhost:8180 - + YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y @@ -77,7 +77,11 @@ - + + + + + - diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/1.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/1.xml new file mode 100644 index 000000000..a04c4f770 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/1.xml @@ -0,0 +1,18 @@ + + + + loanoutNumber-1303941414596 + urn:cspace:org.collectionspace.demo:orgauthority:name(TestOrgAuth):organization:name(Northern Climes Museum)'Northern Climes Museum' + urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth):person:name(Chris Contact)'Chris Contact' + + + returned + Left under the front mat. + + + returnDate-1303941414596 + utf-8-data-fragment:ΔӁŴΩ + Allow people in cold climes to share the magic of Surfboards of the 1960s. + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/loanout.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/loanout.xml new file mode 100644 index 000000000..58d360a62 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/loanout/loanout.xml @@ -0,0 +1,19 @@ + + + + + YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y + YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y + + + + + POST + /cspace-services/loansout/ + loanout/1.xml + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/object-exit.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/object-exit.xml index c0b11cb42..1f2cb1044 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/object-exit.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/object-exit.xml @@ -73,6 +73,33 @@ + + + + POST + /cspace-services/objectexit/ + + checkList-1234 + + objectexit/oe35.xml + + + GET + /cspace-services/objectexit/ + + + objectexit/res/oe35.res.xml + + ${oe35.CSID} + + + //objectexit-list-item[./exitNumber='checkList-1234'] + + + + @@ -373,6 +400,7 @@ + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/oe35.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/oe35.xml new file mode 100644 index 000000000..a707148dc --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/oe35.xml @@ -0,0 +1,10 @@ + + + + urn:cspace:org.collectionspace.demo:orgauthority:name(TestOrgAuth):organization:name(Northern Climes Museum)'Northern Climes Museum' + ${exitNumber} + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe17.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe17.res.xml index c9f6cbc3d..97c4e2d9b 100755 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe17.res.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe17.res.xml @@ -1,2 +1,14 @@ -04011objectexit_common:depositorurn:cspace:org.collectionspace.demo:personauthority:name(ObjectexitPersonAuth)'ObjectexitPersonAuth':person:name(davenportDepositor)ObjectexitPersonAuth/personauthorities/urn:cspace:name(ObjectexitPersonAuth)/items/urn:cspace:name(davenportDepositor) + + + 0 + 40 + 1 + 1 + + objectexit_common:depositor + urn:cspace:org.collectionspace.demo:personauthority:name(ObjectexitPersonAuth)'ObjectexitPersonAuth':person:name(davenportDepositor) + ObjectexitPersonAuth + /personauthorities/urn:cspace:name(ObjectexitPersonAuth)/items/urn:cspace:name(davenportDepositor) + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe35.res.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe35.res.xml new file mode 100644 index 000000000..85d4af99b --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/objectexit/res/oe35.res.xml @@ -0,0 +1,13 @@ + + + 0 + 40 + 1 + 1 + exitNumber|currentOwner|uri|csid + + ${exitNumber} + /objectexit/${CSID} + ${CSID} + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml index 6450c6520..a267c3692 100755 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml @@ -33,13 +33,9 @@ File below this line have been ported. --> - - + diff --git a/services/common/src/main/cspace/config/services/tenants/collectionspace/tenant-bindings.xml b/services/common/src/main/cspace/config/services/tenants/collectionspace/tenant-bindings.xml index 063dafa23..66dafd381 100644 --- a/services/common/src/main/cspace/config/services/tenants/collectionspace/tenant-bindings.xml +++ b/services/common/src/main/cspace/config/services/tenants/collectionspace/tenant-bindings.xml @@ -181,8 +181,8 @@ blobs blobs name|mimeType|encoding|length|uri|csid - org.collectionspace.services.blob.BlobsCommonList - org.collectionspace.services.blob.BlobsCommonList$BlobListItem + + getBlobListItem @@ -192,7 +192,7 @@ mimeType - mimeType + mimeType @@ -200,11 +200,11 @@ encoding - - length - length - - + + length + length + + @@ -327,8 +327,8 @@ loansin loansin loanInNumber|lenderList|loanReturnDate|uri|csid - org.collectionspace.services.loanin.LoansinCommonList - org.collectionspace.services.loanin.LoansinCommonList$LoaninListItem + + getLoaninListItem @@ -337,7 +337,7 @@ lender - lenderGroupList/[0]/lender + lenderGroupList/[0]/lender loanReturnDate @@ -504,30 +504,40 @@ org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler - objectexit - objectexit - exitNumber|currentOwner|uri|csid - org.collectionspace.services.objectexit.ObjectexitCommonList - org.collectionspace.services.objectexit.ObjectexitCommonList$ObjectexitListItem - getObjectexitListItem - - - exitNumber - exitNumber - + objectexit + objectexit + exitNumber|currentOwner|uri|csid + org.collectionspace.services.objectexit.ObjectexitCommonList + + org.collectionspace.services.objectexit.ObjectexitCommonList$ObjectexitListItem + + getObjectexitListItem + + + exitNumber + exitNumber + setExitNumber + currentOwner - currentOwner + currentOwner + setCurrentOwner - + org.collectionspace.services.objectexit.nuxeo.ObjectExitValidatorHandler - objectNamePropertycurrentOwner - objectNumberPropertyexitNumber + + objectNameProperty + currentOwner + + + objectNumberProperty + exitNumber + @@ -536,8 +546,8 @@ label="objectexit-system" updated="" order="0"> + namespaceURI="http://collectionspace.org/services/common/system" + schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd"> @@ -545,13 +555,19 @@ versionable="true" auditable="false" label="objectexit_common" updated="" order="1"> - authRefcurrentOwner - authRefdepositor + + authRef + currentOwner + + + authRef + depositor + + namespaceURI="http://collectionspace.org/services/objectexit" + schemaLocation="http://collectionspace.org/services/objectexit http://services.collectionspace.org/objectexit/objectexit_common.xsd"> @@ -560,8 +576,8 @@ label="collectionspace_core" updated="" order="2"> + namespaceURI="http://collectionspace.org/collectionspace_core/" + schemaLocation="http://collectionspace.org/collectionspace_core/ http://services.collectionspace.org/collectionspace_core.xsd"> @@ -569,7 +585,7 @@ - + /groups/*/workflow/ @@ -586,15 +602,15 @@ groups groups title|uri|csid - org.collectionspace.services.group.GroupCommonList - org.collectionspace.services.group.GroupCommonList$GroupListItem + + getGroupListItem title title - + @@ -658,13 +674,13 @@ imports importsField|uri|csid org.collectionspace.services.imports.ImportsCommonList - org.collectionspace.services.imports.ImportsCommonList$ImportsListItem - + org.collectionspace.services.imports.ImportsCommonList$ImportsListItem getImportsListItem importsField importsField + setImportsField @@ -722,8 +738,8 @@ media media title|source|filename|identificationNumber|uri|csid - org.collectionspace.services.media.MediaCommonList - org.collectionspace.services.media.MediaCommonList$MediaListItem + + getMediaListItem @@ -732,7 +748,7 @@ source - source + source filename @@ -741,8 +757,8 @@ identificationNumber identificationNumber - - + + @@ -1541,8 +1557,8 @@ acquisition acquisition acquisitionReferenceNumber|acquisitionSources|owners|uri|csid - org.collectionspace.services.acquisition.AcquisitionsCommonList - org.collectionspace.services.acquisition.AcquisitionsCommonList$AcquisitionListItem + + getAcquisitionListItem @@ -1551,7 +1567,7 @@ acquisitionSource - acquisitionSources/[0] + acquisitionSources/[0] owner diff --git a/services/common/src/main/java/org/collectionspace/services/common/ReflectionMapper.java b/services/common/src/main/java/org/collectionspace/services/common/ReflectionMapper.java index 99f3e59dd..b7780a657 100755 --- a/services/common/src/main/java/org/collectionspace/services/common/ReflectionMapper.java +++ b/services/common/src/main/java/org/collectionspace/services/common/ReflectionMapper.java @@ -91,6 +91,10 @@ public class ReflectionMapper { } public static Object instantiate(String classname) throws Exception { + if (classname == null) { + throw new Exception("classname was null in ReflectionMapper.instantiate()"); + } + classname = classname.trim(); Class cl = Class.forName(classname); Class [] classParm = null; Object [] objectParm = null; diff --git a/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java b/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java index d546c77e3..e9831fa57 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java +++ b/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java @@ -231,7 +231,7 @@ extends AbstractMultiPartCollectionSpaceResourceImpl { return result; } - + /** subclasses may override this method, which is called from #get(String) * which handles setup of ServiceContext and DocumentHandler, and Exception handling.*/ @@ -245,23 +245,26 @@ extends AbstractMultiPartCollectionSpaceResourceImpl { //======================= GET without csid. List, search, etc. ===================================== - @GET - public AbstractCommonList getList(@Context UriInfo ui) { - MultivaluedMap queryParams = ui.getQueryParameters(); - String keywords = queryParams.getFirst(IQueryManager.SEARCH_TYPE_KEYWORDS_KW); - if (keywords != null) { - return search(queryParams, keywords); - } else { - return getList(queryParams); - } - } + @GET + public AbstractCommonList getList(@Context UriInfo ui) { + MultivaluedMap queryParams = ui.getQueryParameters(); + String keywords = queryParams.getFirst(IQueryManager.SEARCH_TYPE_KEYWORDS_KW); + AbstractCommonList list; + if (keywords != null) { + list = search(queryParams, keywords); + } else { + list = getList(queryParams); + } + return list; + } protected AbstractCommonList getList(MultivaluedMap queryParams) { try { ServiceContext ctx = createServiceContext(queryParams); DocumentHandler handler = createDocumentHandler(ctx); getRepositoryClient(ctx).getFiltered(ctx, handler); - return (AbstractCommonList)handler.getCommonPartList(); + AbstractCommonList list = (AbstractCommonList)handler.getCommonPartList(); + return list; } catch (Exception e) { throw bigReThrow(e, ServiceMessages.LIST_FAILED); } diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java index 96daaf235..dba9ab816 100755 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java @@ -93,6 +93,10 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl extends RemoteDocumentModelHandlerImpl wrapDoc) throws Exception { + String classname = getDocHandlerParams().getAbstractCommonListClassname(); + if (Tools.isBlank(classname)){ + return extractCommonPartListPATRICK(wrapDoc); + } + + String label = getServiceContext().getCommonPartLabel(); + AbstractCommonList commonList = createAbstractCommonListImpl(); + //LC extractPagingInfo((commonList), wrapDoc); + commonList.setFieldsReturned(getSummaryFields(commonList)); + List list = createItemsList(commonList); + Iterator iter = wrapDoc.getWrappedObject().iterator(); + while(iter.hasNext()){ + DocumentModel docModel = iter.next(); + String id = NuxeoUtils.getCsid(docModel);//NuxeoUtils.extractId(docModel.getPathAsString()); + Object item = createItemForCommonList(docModel, label, id); + list.add(item); + } + extractPagingInfo((commonList), wrapDoc); //LC + return commonList; + } + + // Laramie20110427 I renamed this method, and restored the method of the same name above. + // this makes the AbstractCommonList descendents as specified in DocHandlerParams + // get pulled in correctly. XPath search works. + // And I commented out the @Override annotation: + //@Override + public AbstractCommonList extractCommonPartListPATRICK(DocumentWrapper wrapDoc) throws Exception { //String label = getServiceContext().getCommonPartLabel(); /* @@ -168,7 +200,7 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl resultsFields = getListItemsArray(); + List resultsFields = getListItemsArray(); //Lookup in tenant-bindings.xml int nFields = resultsFields.size()+2; String fields[] = new String[nFields]; fields[0] = "csid"; diff --git a/services/loanin/service/src/main/java/org/collectionspace/services/loanin/LoaninResource.java b/services/loanin/service/src/main/java/org/collectionspace/services/loanin/LoaninResource.java index e3cb711ef..8b19a5877 100644 --- a/services/loanin/service/src/main/java/org/collectionspace/services/loanin/LoaninResource.java +++ b/services/loanin/service/src/main/java/org/collectionspace/services/loanin/LoaninResource.java @@ -48,6 +48,7 @@ import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.common.AbstractMultiPartCollectionSpaceResourceImpl; import org.collectionspace.services.common.ClientType; import org.collectionspace.services.common.ServiceMain; +import org.collectionspace.services.common.ServiceMessages; import org.collectionspace.services.common.authorityref.AuthorityRefList; import org.collectionspace.services.common.context.MultipartServiceContext; import org.collectionspace.services.common.context.MultipartServiceContextFactory; @@ -137,13 +138,6 @@ public class LoaninResource extends // return docHandler; // } - /** - * Creates the loanin. - * - * @param input the input - * - * @return the response - */ @POST public Response createLoanin(String xmlText) { try { @@ -263,17 +257,8 @@ public class LoaninResource extends DocumentHandler handler = createDocumentHandler(ctx); getRepositoryClient(ctx).getFiltered(ctx, handler); loaninObjectList = (CommonList) handler.getCommonPartList(); - } catch (UnauthorizedException ue) { - Response response = Response.status( - Response.Status.UNAUTHORIZED).entity("Index failed reason " + ue.getErrorReason()).type("text/plain").build(); - throw new WebApplicationException(response); } catch (Exception e) { - if (logger.isDebugEnabled()) { - logger.debug("Caught exception in getLoaninList", e); - } - Response response = Response.status( - Response.Status.INTERNAL_SERVER_ERROR).entity("Index failed").type("text/plain").build(); - throw new WebApplicationException(response); + throw bigReThrow(e, ServiceMessages.LIST_FAILED, "no-csid-for-list"); } return loaninObjectList; } @@ -353,10 +338,7 @@ public class LoaninResource extends /** * Update loanin. - * * @param csid the csid - * @param theUpdate the the update - * * @return the multipart output */ @PUT diff --git a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java index 01b947a00..5851400f6 100644 --- a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java +++ b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitClient.java @@ -17,6 +17,8 @@ package org.collectionspace.services.client; import org.collectionspace.services.jaxb.AbstractCommonList; +import org.collectionspace.services.objectexit.ObjectexitCommonList; + import org.jboss.resteasy.client.ClientResponse; /** @@ -26,7 +28,7 @@ import org.jboss.resteasy.client.ClientResponse; * $LastChangedDate: 2010-05-17 18:25:37 -0700 (Mon, 17 May 2010) $ * */ -public class ObjectExitClient extends AbstractPoxServiceClientImpl { +public class ObjectExitClient extends AbstractPoxServiceClientImpl { public static final String SERVICE_NAME = "objectexit"; public static final String SERVICE_PATH_COMPONENT = SERVICE_NAME; public static final String SERVICE_PATH = "/" + SERVICE_PATH_COMPONENT; @@ -53,7 +55,12 @@ public class ObjectExitClient extends AbstractPoxServiceClientImpl readList() { + public ClientResponse readList() { return getProxy().readList(); } + + public ObjectexitCommonList readList2(){ + ObjectexitCommonList list = readList().getEntity(ObjectexitCommonList.class); + return list; + } } diff --git a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java index 85ed676b0..49189d2af 100644 --- a/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java +++ b/services/objectexit/client/src/main/java/org/collectionspace/services/client/ObjectExitProxy.java @@ -9,6 +9,8 @@ import javax.ws.rs.QueryParam; import org.collectionspace.services.client.workflow.WorkflowClient; import org.collectionspace.services.jaxb.AbstractCommonList; +import org.collectionspace.services.objectexit.ObjectexitCommonList; + /** * @version $Revision: 2108 $ @@ -16,21 +18,21 @@ import org.collectionspace.services.jaxb.AbstractCommonList; @Path(ObjectExitClient.SERVICE_PATH + "/") @Produces({"application/xml"}) @Consumes({"application/xml"}) -public interface ObjectExitProxy extends CollectionSpacePoxProxy { +public interface ObjectExitProxy extends CollectionSpacePoxProxy { // List @GET - ClientResponse readList(); + ClientResponse readList(); @Override @GET @Produces({"application/xml"}) - ClientResponse readIncludeDeleted( + ClientResponse readIncludeDeleted( @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted); @Override @GET @Produces({"application/xml"}) - ClientResponse keywordSearchIncludeDeleted( + ClientResponse keywordSearchIncludeDeleted( @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords, @QueryParam(WorkflowClient.WORKFLOW_QUERY_NONDELETED) String includeDeleted); } diff --git a/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java b/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java index b886aedae..0e4dba462 100644 --- a/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java +++ b/services/objectexit/client/src/test/java/org/collectionspace/services/client/test/ObjectExitServiceTest.java @@ -33,6 +33,7 @@ import org.collectionspace.services.client.PayloadOutputPart; import org.collectionspace.services.client.PoxPayloadIn; import org.collectionspace.services.client.PoxPayloadOut; import org.collectionspace.services.jaxb.AbstractCommonList; +import org.collectionspace.services.objectexit.ObjectexitCommonList; import org.collectionspace.services.objectexit.ObjectexitCommon; import org.jboss.resteasy.client.ClientResponse; @@ -42,6 +43,8 @@ import org.testng.annotations.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +//import org.w3c.dom.Element; +//import org.w3c.dom.Node; /** * ObjectExitServiceTest, carries out tests against a deployed and running ObjectExit Service.

@@ -66,13 +69,13 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { } @Override - protected CollectionSpaceClient getClientInstance() { + protected CollectionSpaceClient getClientInstance() { return new ObjectExitClient(); } @Override protected AbstractCommonList getAbstractCommonList(ClientResponse response) { - return response.getEntity(AbstractCommonList.class); + return response.getEntity(ObjectexitCommonList.class); } @Override @@ -119,9 +122,14 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { logger.debug(testBanner(testName, CLASS_NAME)); setupReadList(); ObjectExitClient client = new ObjectExitClient(); - ClientResponse res = client.readList(); - AbstractCommonList list = res.getEntity(); + ClientResponse res = client.readList(); + String bar = "\r\n\r\n=================================\r\n\r\n"; + System.out.println(bar+" res: "+res); + ObjectexitCommonList list = res.getEntity(); + + System.out.println(bar+" list: "+list); assertStatusCode(res, testName); + if (logger.isDebugEnabled()) { List items = list.getListItem(); @@ -132,6 +140,23 @@ public class ObjectExitServiceTest extends AbstractServiceTestImpl { i++; } } + + /* + List items = list.getListItem(); + int i = 0; + for(AbstractCommonList.ListItem item : items){ + List elList = item.getAny(); + StringBuilder elementStrings = new StringBuilder(); + for(Element el : elList) { + Node textEl = el.getFirstChild(); + if (textEl != null){ + elementStrings.append("["+el.getNodeName()+":"+textEl.getNodeValue()+"] "); + } + } + System.out.println("\r\n\r\n\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~"+testName + ": list-item[" + i + "]: "+elementStrings.toString()); + i++; + } + */ } @Override diff --git a/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd b/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd index 254e0ee8e..75fce1400 100644 --- a/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd +++ b/services/objectexit/jaxb/src/main/resources/objectexit_common.xsd @@ -58,6 +58,36 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.47.3