[OLINGO-832] Fix in xml serialization for streamed entity set/iterator
This commit is contained in:
parent
a44f38d70d
commit
40ff7be0f3
|
@ -74,11 +74,10 @@ public class BasicStreamITCase extends AbstractBaseTestITCase {
|
|||
assertTrue(content.contains("<m:element>Streamed-Employee1@company.example</m:element>" +
|
||||
"<m:element>Streamed-Employee2@company.example</m:element>" +
|
||||
"<m:element>Streamed-Employee3@company.example</m:element>"));
|
||||
assertTrue(content.contains("<d:PropertyString>TEST 1</d:PropertyString>"));
|
||||
assertTrue(content.contains("<d:PropertyString>TEST 2</d:PropertyString>"));
|
||||
assertTrue(content.contains("<d:PropertyString>TEST 1->streamed</d:PropertyString>"));
|
||||
assertTrue(content.contains("<d:PropertyString>TEST 2->streamed</d:PropertyString>"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ODataClient getClient() {
|
||||
return null;
|
||||
|
|
|
@ -286,16 +286,8 @@ public class ODataXmlSerializer extends AbstractODataSerializer {
|
|||
EntityCollectionSerializerOptions options, OutputStream outputStream) throws SerializerException {
|
||||
|
||||
final ContextURL contextURL = checkContextURL(options == null ? null : options.getContextURL());
|
||||
// if (options != null && options.getWriteOnlyReferences()) {
|
||||
// ReferenceCollectionSerializerOptions rso = ReferenceCollectionSerializerOptions.with()
|
||||
// .contextURL(contextURL).build();
|
||||
// return entityReferenceCollection(entitySet, rso);
|
||||
// }
|
||||
|
||||
SerializerException cachedException = null;
|
||||
SerializerException cachedException;
|
||||
try {
|
||||
CircleStreamBuffer buffer = new CircleStreamBuffer();
|
||||
outputStream = buffer.getOutputStream();
|
||||
XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(outputStream, DEFAULT_CHARSET);
|
||||
writer.writeStartDocument(DEFAULT_CHARSET, "1.0");
|
||||
writer.writeStartElement(ATOM, Constants.ATOM_ELEM_FEED, NS_ATOM);
|
||||
|
@ -317,9 +309,6 @@ public class ODataXmlSerializer extends AbstractODataSerializer {
|
|||
&& entitySet.getCount() != null) {
|
||||
writeCount(entitySet, writer);
|
||||
}
|
||||
if (entitySet.getNext() != null) {
|
||||
writeNextLink(entitySet, writer);
|
||||
}
|
||||
|
||||
if (options == null) {
|
||||
writeEntitySet(metadata, entityType, entitySet, null, null, null, writer);
|
||||
|
|
|
@ -567,8 +567,7 @@ public class TechnicalEntityProcessor extends TechnicalProcessor
|
|||
* otherwise <code>FALSE</code>.
|
||||
*/
|
||||
private boolean isStreaming(EdmEntitySet edmEntitySet, ContentType contentType) {
|
||||
return contentType.isCompatible(ContentType.APPLICATION_JSON)
|
||||
&& ContainerProvider.ES_STREAM.equalsIgnoreCase(edmEntitySet.getName());
|
||||
return ContainerProvider.ES_STREAM.equalsIgnoreCase(edmEntitySet.getName());
|
||||
}
|
||||
|
||||
private SerializerResult serializeEntityCollection(final ODataRequest request, final EntityCollection
|
||||
|
|
Loading…
Reference in New Issue