From ecf9b9f9ba25a63834f418b3a7a71e98daab7e90 Mon Sep 17 00:00:00 2001 From: mibo Date: Wed, 16 Nov 2016 20:19:46 +0100 Subject: [PATCH] [OLINGO-713] Minor fix in batch tutorial --- samples/tutorials/p11_batch/pom.xml | 30 ++++++++++++++----- .../service/DemoBatchProcessor.java | 8 ++--- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/samples/tutorials/p11_batch/pom.xml b/samples/tutorials/p11_batch/pom.xml index 4b6cc2638..2016b0b40 100644 --- a/samples/tutorials/p11_batch/pom.xml +++ b/samples/tutorials/p11_batch/pom.xml @@ -29,15 +29,29 @@ ${project.artifactId}-Webapp - - DemoService - + + 2.5 + 4.4.0-SNAPSHOT + 1.7.7 + 1.6 + 3.2 + UTF-8 + - - 2.5 - 4.4.0-SNAPSHOT - 1.7.7 - + + DemoService + + + org.apache.maven.plugins + maven-compiler-plugin + ${compiler.plugin.version} + + ${project.source} + ${project.source} + + + + diff --git a/samples/tutorials/p11_batch/src/main/java/myservice/mynamespace/service/DemoBatchProcessor.java b/samples/tutorials/p11_batch/src/main/java/myservice/mynamespace/service/DemoBatchProcessor.java index 49da784f9..4813ea05b 100644 --- a/samples/tutorials/p11_batch/src/main/java/myservice/mynamespace/service/DemoBatchProcessor.java +++ b/samples/tutorials/p11_batch/src/main/java/myservice/mynamespace/service/DemoBatchProcessor.java @@ -122,12 +122,12 @@ public class DemoBatchProcessor implements BatchProcessor { responseParts.add(facade.handleBatchRequest(part)); } - // 5. Serialize the response content - final InputStream responseContent = odata.createFixedFormatSerializer().batchResponse(responseParts, boundary); - - // 6. Create a new boundary for the response + // 5. Create a new boundary for the response final String responseBoundary = "batch_" + UUID.randomUUID().toString(); + // 6. Serialize the response content + final InputStream responseContent = odata.createFixedFormatSerializer().batchResponse(responseParts, responseBoundary); + // 7. Setup response response.setHeader(HttpHeader.CONTENT_TYPE, ContentType.MULTIPART_MIXED + ";boundary=" + responseBoundary); response.setContent(responseContent);