From a749ca1ecc2a669a81d32089060341ef6e64f314 Mon Sep 17 00:00:00 2001 From: Manuele Simi Date: Tue, 26 Oct 2010 02:08:27 +0000 Subject: [PATCH] Adding remove tester, changelog updated git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Collector@30072 82a268e6-3cf1-43bd-a215-b396298e98cf --- changelog.xml | 4 +++- .../testsuite/wsdaix/RemoveDocumentsTester.java | 15 +++++++++++++-- .../stubs/testsuite/wsdaix/metadataRP.xml | 10 ++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/metadataRP.xml diff --git a/changelog.xml b/changelog.xml index c4749ce..dd69ae1 100644 --- a/changelog.xml +++ b/changelog.xml @@ -1,7 +1,9 @@ - WSDAI::XMLCollectionAccess interface + WSDAIX::XMLCollectionAccess interface internal refactoring of resources + introducing metadata record for GCUBE Resources + enhanced and simplified XMLStorage GetProfileLastModificationTimeMs and GetResourceLastModificationTimeMs operations diff --git a/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/RemoveDocumentsTester.java b/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/RemoveDocumentsTester.java index 6ef7df2..bc5b2e5 100644 --- a/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/RemoveDocumentsTester.java +++ b/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/RemoveDocumentsTester.java @@ -14,6 +14,7 @@ import org.gcube.informationsystem.collector.stubs.wsdai.NotAuthorizedFaultType; import org.gcube.informationsystem.collector.stubs.wsdai.ServiceBusyFaultType; import org.gcube.informationsystem.collector.stubs.wsdaix.InvalidCollectionNameFaultType; import org.gcube.informationsystem.collector.stubs.wsdaix.RemoveDocumentRequestWrapper; +import org.gcube.informationsystem.collector.stubs.wsdaix.RemoveDocumentResponseWrapper; import org.gcube.informationsystem.collector.stubs.wsdaix.RemoveDocumentsRequest; import org.gcube.informationsystem.collector.stubs.wsdaix.RemoveDocumentsResponse; import org.gcube.informationsystem.collector.stubs.wsdaix.XMLCollectionAccessPT; @@ -37,12 +38,22 @@ public class RemoveDocumentsTester { public static void main(String[] args) { final String portTypeURI = "http://" + args[0] + ":" + args[1] + "/wsrf/services/gcube/informationsystem/collector/wsdaix/XMLCollectionAccess"; - + try { + RemoveDocumentsResponse response = removeDocuments(portTypeURI, GCUBEScope.getScope(args[2]), new URI("args[2]" + args[3]), new URI(args[4]), new String[]{args[5]}); + RemoveDocumentResponseWrapper[] wrappers = response.getRemoveDocumentResponseWrapper(); + for (RemoveDocumentResponseWrapper wrapper : wrappers) { + logger.info("Document name " + wrapper.getDocumentName()); + logger.info("Document response " + wrapper.getResponse().toString()); + //XMLWrapperType detail = wrapper.getDetail(); + } + } catch (Exception e ) { + logger.error(e.toString()); + } } /** - * Execute the RemoveDocuments operation + * Executes the RemoveDocuments operation * @param serviceURL The URL of the data service * @param resourceName The abstract name of the data resource * @param collectionURI The URI of the collection from which documents should be removed diff --git a/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/metadataRP.xml b/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/metadataRP.xml new file mode 100644 index 0000000..236f337 --- /dev/null +++ b/src/org/gcube/informationsystem/collector/stubs/testsuite/wsdaix/metadataRP.xml @@ -0,0 +1,10 @@ +2ae39110-f1e3-11dd-a231-93c15428dfa9 +2010-10-13T10:10:42.666Z + +2010-10-25T15:29:58.796Z +2f23c380-6e56-11df-a68f-9633095c689f +6ce2bae0-73d9-11df-9fc3-9b632b18ef39 +MetadataManagement +/d4science.research-infrastructures.eu/FARM/FCPPS +70cc7a90-c49e-11df-a87e-a036f71a9955 +MetadataManager \ No newline at end of file