Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Remove pretty printing so Java Azure Storage SDK can handle response XML messages #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/xml/queue/QueueList.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ class QueueList {
if (this.MaxResults === undefined) {
delete this.MaxResults;
}
let xml = js2xml.parse('EnumerationResults', this);

const options = {
format: {
pretty: false
}
}

let xml = js2xml.parse('EnumerationResults', this, options);
xml = xml.replace(`<EnumerationResults>`, `<EnumerationResults ServiceEndpoint="http://localhost:10001/devstoreaccount1">`);
xml = xml.replace(`<?xml version='1.0'?>`, `<?xml version="1.0" encoding="utf-8"?>`);
xml = xml.replace(/\>[\s]+\</g, '><');
Expand Down
7 changes: 6 additions & 1 deletion lib/xml/queue/QueueMessageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ class QueueMessagesListXmlModel {
}

toXml() {
const options = {
format: {
pretty: false
}
}

return js2xml.parse('QueueMessagesList', this);
return js2xml.parse('QueueMessagesList', this, options);
}
}

Expand Down
8 changes: 7 additions & 1 deletion lib/xml/queue/QueueMessageText.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ class QueueMessageText {
}

toXml() {
return js2xml.parse('QueueMessage', this);
const options = {
format: {
pretty: false
}
}

return js2xml.parse('QueueMessage', this, options);
}
}

Expand Down