]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
220a318d34a5af1b491f163b5d7d1f1574144f94
[tmp/jakarta-migration.git] /
1 /**
2  * This document is a part of the source code and related artifacts
3  * for CollectionSpace, an open source collections management system
4  * for museums and related institutions:
5  *
6  * http://www.collectionspace.org
7  * http://wiki.collectionspace.org
8  *
9  * Copyright © 2009 Regents of the University of California
10  *
11  * Licensed under the Educational Community License (ECL), Version 2.0.
12  * You may not use this file except in compliance with this License.
13  *
14  * You may obtain a copy of the ECL 2.0 License at
15  * https://source.collectionspace.org/collection-space/LICENSE.txt
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 package org.collectionspace.services.client.test;
24
25 import java.util.List;
26 import javax.ws.rs.core.MediaType;
27 import javax.ws.rs.core.Response;
28
29 import org.collectionspace.services.client.CollectionSpaceClient;
30 import org.collectionspace.services.client.PayloadInputPart;
31 import org.collectionspace.services.client.PayloadOutputPart;
32 import org.collectionspace.services.client.PoxPayloadIn;
33 import org.collectionspace.services.client.PoxPayloadOut;
34 import org.collectionspace.services.client.ReportClient;
35 import org.collectionspace.services.report.ReportsCommon;
36 import org.collectionspace.services.report.ReportsCommonList;
37 import org.collectionspace.services.jaxb.AbstractCommonList;
38
39 import org.jboss.resteasy.client.ClientResponse;
40 import org.testng.Assert;
41 //import org.testng.annotations.AfterClass;
42 import org.testng.annotations.Test;
43
44 import org.slf4j.Logger;
45 import org.slf4j.LoggerFactory;
46
47 /**
48  * FIXME: http://issues.collectionspace.org/browse/CSPACE-1685
49  * ReportServiceTest, carries out tests against a
50  * deployed and running Report Service.
51  *
52  * $LastChangedRevision: 2261 $
53  * $LastChangedDate: 2010-05-28 16:52:22 -0700 (Fri, 28 May 2010) $
54  */
55 public class ReportServiceTest extends AbstractServiceTestImpl {
56
57     /** The logger. */
58     private final String CLASS_NAME = ReportServiceTest.class.getName();
59     private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
60     final String SERVICE_NAME = "reports";
61     final String SERVICE_PATH_COMPONENT = "reports";
62     // Instance variables specific to this test.
63     /** The known resource id. */
64     private String knownResourceId = null;
65
66     /* (non-Javadoc)
67      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
68      */
69     @Override
70     protected CollectionSpaceClient getClientInstance() {
71         return new ReportClient();
72     }
73
74     /* (non-Javadoc)
75      * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
76      */
77     @Override
78     protected AbstractCommonList getAbstractCommonList(
79             ClientResponse<AbstractCommonList> response) {
80         return response.getEntity(ReportsCommonList.class);
81     }
82
83 //    @Override
84 //    protected PoxPayloadOut createInstance(String identifier) {
85 //        PoxPayloadOut multipart = createReportInstance(identifier);
86 //        return multipart;
87 //    }
88         
89     // ---------------------------------------------------------------
90     // CRUD tests : CREATE tests
91     // ---------------------------------------------------------------
92     // Success outcomes
93     /* (non-Javadoc)
94      * @see org.collectionspace.services.client.test.ServiceTest#create(java.lang.String)
95      */
96     @Override
97     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class)
98     public void create(String testName) throws Exception {
99
100         if (logger.isDebugEnabled()) {
101             logger.debug(testBanner(testName, CLASS_NAME));
102         }
103         // Perform setup, such as initializing the type of service request
104         // (e.g. CREATE, DELETE), its valid and expected status codes, and
105         // its associated HTTP method name (e.g. POST, DELETE).
106         setupCreate();
107
108         // Submit the request to the service and store the response.
109         ReportClient client = new ReportClient();
110         String identifier = createIdentifier();
111         PoxPayloadOut multipart = createReportInstance(identifier);
112         ClientResponse<Response> res = client.create(multipart);
113
114         // Check the status code of the response: does it match
115         // the expected response(s)?
116         //
117         // Specifically:
118         // Does it fall within the set of valid status codes?
119         // Does it exactly match the expected status code?
120         int statusCode = res.getStatus();
121         if (logger.isDebugEnabled()) {
122             logger.debug(testName + ": status = " + statusCode);
123         }
124         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
125                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
126         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
127
128         // Store the ID returned from the first resource created
129         // for additional tests below.
130         if (knownResourceId == null) {
131             knownResourceId = extractId(res);
132             if (logger.isDebugEnabled()) {
133                 logger.debug(testName + ": knownResourceId=" + knownResourceId);
134             }
135         }
136
137         // Store the IDs from every resource created by tests,
138         // so they can be deleted after tests have been run.
139         allResourceIdsCreated.add(extractId(res));
140     }
141
142     /* (non-Javadoc)
143      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createList(java.lang.String)
144      */
145     @Override
146     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
147     dependsOnMethods = {"create"})
148     public void createList(String testName) throws Exception {
149         for (int i = 0; i < 3; i++) {
150             create(testName);
151         }
152     }
153
154     // Failure outcomes
155     // Placeholders until the three tests below can be uncommented.
156     // See Issue CSPACE-401.
157     /* (non-Javadoc)
158      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithEmptyEntityBody(java.lang.String)
159      */
160     @Override
161     public void createWithEmptyEntityBody(String testName) throws Exception {
162         //Should this really be empty?
163     }
164
165     /* (non-Javadoc)
166      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithMalformedXml(java.lang.String)
167      */
168     @Override
169     public void createWithMalformedXml(String testName) throws Exception {
170         //Should this really be empty?
171     }
172
173     /* (non-Javadoc)
174      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#createWithWrongXmlSchema(java.lang.String)
175      */
176     @Override
177     public void createWithWrongXmlSchema(String testName) throws Exception {
178         //Should this really be empty?
179     }
180
181     // ---------------------------------------------------------------
182     // CRUD tests : READ tests
183     // ---------------------------------------------------------------
184     // Success outcomes
185     /* (non-Javadoc)
186      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#read(java.lang.String)
187      */
188     @Override
189     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
190     dependsOnMethods = {"create"})
191     public void read(String testName) throws Exception {
192
193         if (logger.isDebugEnabled()) {
194             logger.debug(testBanner(testName, CLASS_NAME));
195         }
196         // Perform setup.
197         setupRead();
198
199         // Submit the request to the service and store the response.
200         ReportClient client = new ReportClient();
201         ClientResponse<String> res = client.read(knownResourceId);
202
203         // Check the status code of the response: does it match
204         // the expected response(s)?
205         int statusCode = res.getStatus();
206         if (logger.isDebugEnabled()) {
207             logger.debug(testName + ": status = " + statusCode);
208         }
209         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
210                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
211         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
212
213         // Get the common part of the response and verify that it is not null.
214         PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
215         PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName());
216         ReportsCommon reportCommon = null;
217         if (payloadInputPart != null) {
218             reportCommon = (ReportsCommon) payloadInputPart.getBody();
219         }
220         Assert.assertNotNull(reportCommon);
221
222         // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters.
223         if (logger.isDebugEnabled()) {
224             logger.debug("UTF-8 data sent=" + getUTF8DataFragment() + "\n"
225                     + "UTF-8 data received=" + reportCommon.getNotes());
226         }
227         Assert.assertEquals(reportCommon.getNotes(), getUTF8DataFragment(),
228                 "UTF-8 data retrieved '" + reportCommon.getNotes()
229                 + "' does not match expected data '" + getUTF8DataFragment());
230     }
231
232     // Failure outcomes
233     /* (non-Javadoc)
234      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readNonExistent(java.lang.String)
235      */
236     @Override
237     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
238     dependsOnMethods = {"read"})
239     public void readNonExistent(String testName) throws Exception {
240
241         if (logger.isDebugEnabled()) {
242             logger.debug(testBanner(testName, CLASS_NAME));
243         }
244         // Perform setup.
245         setupReadNonExistent();
246
247         // Submit the request to the service and store the response.
248         ReportClient client = new ReportClient();
249         ClientResponse<String> res = client.read(NON_EXISTENT_ID);
250         int statusCode = res.getStatus();
251
252         // Check the status code of the response: does it match
253         // the expected response(s)?
254         if (logger.isDebugEnabled()) {
255             logger.debug(testName + ": status = " + statusCode);
256         }
257         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
258                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
259         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
260     }
261
262     // ---------------------------------------------------------------
263     // CRUD tests : READ_LIST tests
264     // ---------------------------------------------------------------
265     // Success outcomes
266     /* (non-Javadoc)
267      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#readList(java.lang.String)
268      */
269     @Override
270     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
271     dependsOnMethods = {"createList", "read"})
272     public void readList(String testName) throws Exception {
273
274         if (logger.isDebugEnabled()) {
275             logger.debug(testBanner(testName, CLASS_NAME));
276         }
277         // Perform setup.
278         setupReadList();
279
280         // Submit the request to the service and store the response.
281         ReportClient client = new ReportClient();
282         ClientResponse<ReportsCommonList> res = client.readList();
283         ReportsCommonList list = res.getEntity();
284         int statusCode = res.getStatus();
285
286         // Check the status code of the response: does it match
287         // the expected response(s)?
288         if (logger.isDebugEnabled()) {
289             logger.debug(testName + ": status = " + statusCode);
290         }
291         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
292                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
293         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
294
295         // Optionally output additional data about list members for debugging.
296         boolean iterateThroughList = false;
297         if (iterateThroughList && logger.isDebugEnabled()) {
298             List<ReportsCommonList.ReportListItem> items =
299                     list.getReportListItem();
300             int i = 0;
301             for (ReportsCommonList.ReportListItem item : items) {
302                 logger.debug(testName + ": list-item[" + i + "] csid="
303                         + item.getCsid());
304                 logger.debug(testName + ": list-item[" + i + "] name="
305                         + item.getName());
306                 logger.debug(testName + ": list-item[" + i + "] outputMIME="
307                         + item.getOutputMIME());
308                 logger.debug(testName + ": list-item[" + i + "] URI="
309                         + item.getUri());
310                 i++;
311             }
312         }
313
314     }
315
316     // ---------------------------------------------------------------
317     // CRUD tests : UPDATE tests
318     // ---------------------------------------------------------------
319     // Success outcomes
320     /* (non-Javadoc)
321      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#update(java.lang.String)
322      */
323     @Override
324     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
325     dependsOnMethods = {"read"})
326     public void update(String testName) throws Exception {
327
328         if (logger.isDebugEnabled()) {
329             logger.debug(testBanner(testName, CLASS_NAME));
330         }
331         // Perform setup.
332         setupUpdate();
333
334         // Retrieve the contents of a resource to update.
335         ReportClient client = new ReportClient();
336         ClientResponse<String> res = client.read(knownResourceId);
337         if (logger.isDebugEnabled()) {
338             logger.debug(testName + ": read status = " + res.getStatus());
339         }
340         Assert.assertEquals(res.getStatus(), EXPECTED_STATUS_CODE);
341         if (logger.isDebugEnabled()) {
342             logger.debug("got object to update with ID: " + knownResourceId);
343         }
344
345         // Extract the common part from the response.
346         PoxPayloadIn input = new PoxPayloadIn(res.getEntity());
347         PayloadInputPart payloadInputPart = input.getPart(client.getCommonPartName());
348         ReportsCommon reportCommon = null;
349         if (payloadInputPart != null) {
350             reportCommon = (ReportsCommon) payloadInputPart.getBody();
351         }
352         Assert.assertNotNull(reportCommon);
353
354         // Update its content.
355         reportCommon.setName("updated-" + reportCommon.getName());
356         reportCommon.setOutputMIME("updated-" + reportCommon.getOutputMIME());
357         if (logger.isDebugEnabled()) {
358             logger.debug("to be updated object");
359             logger.debug(objectAsXmlString(reportCommon, ReportsCommon.class));
360         }
361         reportCommon.setNotes("updated-" + reportCommon.getNotes());
362
363         // Submit the updated common part in an update request to the service
364         // and store the response.
365         PoxPayloadOut output = new PoxPayloadOut(this.getServicePathComponent());
366         PayloadOutputPart commonPart = output.addPart(reportCommon, MediaType.APPLICATION_XML_TYPE);
367         commonPart.setLabel(client.getCommonPartName());
368         res = client.update(knownResourceId, output);
369
370         // Check the status code of the response: does it match the expected response(s)?
371         int statusCode = res.getStatus();
372         if (logger.isDebugEnabled()) {
373             logger.debug(testName + ": status = " + statusCode);
374         }
375         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
376                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
377         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
378
379         // Extract the updated common part from the response.
380         input = new PoxPayloadIn(res.getEntity());
381         payloadInputPart = input.getPart(client.getCommonPartName());
382         ReportsCommon updatedReportCommon = null;
383         if (payloadInputPart != null) {
384             updatedReportCommon = (ReportsCommon) payloadInputPart.getBody();
385         }
386         Assert.assertNotNull(updatedReportCommon);
387         if (logger.isDebugEnabled()) {
388             logger.debug("updated object");
389             logger.debug(objectAsXmlString(updatedReportCommon, ReportsCommon.class));
390         }
391
392         // Check selected fields in the updated common part.
393         Assert.assertEquals(updatedReportCommon.getName(),
394                 reportCommon.getName(),
395                 "Data in updated object did not match submitted data.");
396
397         // Check the values of fields containing Unicode UTF-8 (non-Latin-1) characters.
398         if (logger.isDebugEnabled()) {
399             logger.debug("UTF-8 data sent=" + reportCommon.getNotes() + "\n"
400                     + "UTF-8 data received=" + updatedReportCommon.getNotes());
401         }
402         Assert.assertTrue(updatedReportCommon.getNotes().contains(getUTF8DataFragment()),
403                 "UTF-8 data retrieved '" + updatedReportCommon.getNotes()
404                 + "' does not contain expected data '" + getUTF8DataFragment());
405         Assert.assertEquals(updatedReportCommon.getNotes(),
406                 reportCommon.getNotes(),
407                 "Data in updated object did not match submitted data.");
408     }
409
410     // Failure outcomes
411     // Placeholders until the three tests below can be uncommented.
412     // See Issue CSPACE-401.
413     /* (non-Javadoc)
414      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithEmptyEntityBody(java.lang.String)
415      */
416     @Override
417     public void updateWithEmptyEntityBody(String testName) throws Exception {
418         //Should this really be empty?
419     }
420
421     /* (non-Javadoc)
422      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithMalformedXml(java.lang.String)
423      */
424     @Override
425     public void updateWithMalformedXml(String testName) throws Exception {
426         //Should this really be empty?
427     }
428
429     /* (non-Javadoc)
430      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateWithWrongXmlSchema(java.lang.String)
431      */
432     @Override
433     public void updateWithWrongXmlSchema(String testName) throws Exception {
434         //Should this really be empty?
435     }
436
437     /* (non-Javadoc)
438      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#updateNonExistent(java.lang.String)
439      */
440     @Override
441     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
442     dependsOnMethods = {"update", "testSubmitRequest"})
443     public void updateNonExistent(String testName) throws Exception {
444
445         if (logger.isDebugEnabled()) {
446             logger.debug(testBanner(testName, CLASS_NAME));
447         }
448         // Perform setup.
449         setupUpdateNonExistent();
450
451         // Submit the request to the service and store the response.
452         // Note: The ID used in this 'create' call may be arbitrary.
453         // The only relevant ID may be the one used in update(), below.
454         ReportClient client = new ReportClient();
455         PoxPayloadOut multipart = createReportInstance(NON_EXISTENT_ID);
456         ClientResponse<String> res = client.update(NON_EXISTENT_ID, multipart);
457         int statusCode = res.getStatus();
458
459         // Check the status code of the response: does it match
460         // the expected response(s)?
461         if (logger.isDebugEnabled()) {
462             logger.debug(testName + ": status = " + statusCode);
463         }
464         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
465                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
466         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
467     }
468
469     // ---------------------------------------------------------------
470     // CRUD tests : DELETE tests
471     // ---------------------------------------------------------------
472     // Success outcomes
473     /* (non-Javadoc)
474      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#delete(java.lang.String)
475      */
476     @Override
477     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
478     dependsOnMethods = {"create", "readList", "testSubmitRequest", "update", "readWorkflow"})
479     public void delete(String testName) throws Exception {
480
481         if (logger.isDebugEnabled()) {
482             logger.debug(testBanner(testName, CLASS_NAME));
483         }
484         // Perform setup.
485         setupDelete();
486
487         // Submit the request to the service and store the response.
488         ReportClient client = new ReportClient();
489         ClientResponse<Response> res = client.delete(knownResourceId);
490         int statusCode = res.getStatus();
491
492         // Check the status code of the response: does it match
493         // the expected response(s)?
494         if (logger.isDebugEnabled()) {
495             logger.debug(testName + ": status = " + statusCode);
496         }
497         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
498                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
499         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
500     }
501
502     // Failure outcomes
503     /* (non-Javadoc)
504      * @see org.collectionspace.services.client.test.AbstractServiceTestImpl#deleteNonExistent(java.lang.String)
505      */
506     @Override
507     @Test(dataProvider = "testName", dataProviderClass = AbstractServiceTestImpl.class,
508     dependsOnMethods = {"delete"})
509     public void deleteNonExistent(String testName) throws Exception {
510
511         if (logger.isDebugEnabled()) {
512             logger.debug(testBanner(testName, CLASS_NAME));
513         }
514         // Perform setup.
515         setupDeleteNonExistent();
516
517         // Submit the request to the service and store the response.
518         ReportClient client = new ReportClient();
519         ClientResponse<Response> res = client.delete(NON_EXISTENT_ID);
520         int statusCode = res.getStatus();
521
522         // Check the status code of the response: does it match
523         // the expected response(s)?
524         if (logger.isDebugEnabled()) {
525             logger.debug(testName + ": status = " + statusCode);
526         }
527         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
528                 invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
529         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
530     }
531
532     // ---------------------------------------------------------------
533     // Utility tests : tests of code used in tests above
534     // ---------------------------------------------------------------
535     /**
536      * Tests the code for manually submitting data that is used by several
537      * of the methods above.
538      */
539     @Test(dependsOnMethods = {"create", "read"})
540     public void testSubmitRequest() {
541
542         // Expected status code: 200 OK
543         final int EXPECTED_STATUS = Response.Status.OK.getStatusCode();
544
545         // Submit the request to the service and store the response.
546         String method = ServiceRequestType.READ.httpMethodName();
547         String url = getResourceURL(knownResourceId);
548         int statusCode = submitRequest(method, url);
549
550         // Check the status code of the response: does it match
551         // the expected response(s)?
552         if (logger.isDebugEnabled()) {
553             logger.debug("testSubmitRequest: url=" + url
554                     + " status=" + statusCode);
555         }
556         Assert.assertEquals(statusCode, EXPECTED_STATUS);
557
558     }
559
560     // ---------------------------------------------------------------
561     // Utility methods used by tests above
562     // ---------------------------------------------------------------
563     @Override
564     protected String getServiceName() {
565         return SERVICE_NAME;
566     }
567
568     /* (non-Javadoc)
569      * @see org.collectionspace.services.client.test.BaseServiceTest#getServicePathComponent()
570      */
571     @Override
572     public String getServicePathComponent() {
573         return SERVICE_PATH_COMPONENT;
574     }
575
576     /**
577      * Creates the report instance.
578      *
579      * @param identifier the identifier
580      * @return the multipart output
581      */
582     private PoxPayloadOut createReportInstance(String identifier) {
583         return createReportInstance(
584                 "name-" + identifier,
585                 "persAuthTermCountsTest.jasper",
586                 "application/pdf");
587     }
588
589     /**
590      * Creates the report instance.
591      *
592      * @param name the report name
593      * @param filename the relative path to the report
594      * @param outputMIME the MIME type we will return for this report
595      * @return the multipart output
596      */
597     private PoxPayloadOut createReportInstance(String name,
598             String filename,
599             String outputMIME) {
600         ReportsCommon reportCommon = new ReportsCommon();
601         reportCommon.setName(name);
602         reportCommon.setFilename(filename);
603         reportCommon.setOutputMIME(outputMIME);
604         reportCommon.setNotes(getUTF8DataFragment()); // For UTF-8 tests
605
606         PoxPayloadOut multipart = new PoxPayloadOut(this.getServicePathComponent());
607         PayloadOutputPart commonPart =
608                 multipart.addPart(reportCommon, MediaType.APPLICATION_XML_TYPE);
609         commonPart.setLabel(new ReportClient().getCommonPartName());
610
611         if (logger.isDebugEnabled()) {
612             logger.debug("to be created, report common");
613             logger.debug(objectAsXmlString(reportCommon, ReportsCommon.class));
614             logger.debug(multipart.toXML());
615         }
616
617         return multipart;
618     }
619 }