Skip to content

Commit 3d804f1

Browse files
authored
Merge pull request #121 from Azure/bug/export-job
Fix Export Jobs in NotificationHubsClient
2 parents dc0693c + b49845e commit 3d804f1

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

NotificationHubs/src/com/windowsazure/messaging/NotificationHubJob.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import java.io.ByteArrayInputStream;
88
import java.io.IOException;
99
import java.io.InputStream;
10+
import java.io.UnsupportedEncodingException;
11+
import java.net.URLEncoder;
12+
import java.nio.charset.StandardCharsets;
1013
import java.util.Date;
1114
import java.util.HashMap;
1215
import java.util.LinkedList;
@@ -232,10 +235,15 @@ public static List<NotificationHubJob> parseCollection(byte[] bodyBytes) throws
232235
public String getXml() {
233236
StringBuilder buf = new StringBuilder();
234237
buf.append(XML_HEADER);
235-
if (this.jobType != null) buf.append("<Type>").append(this.jobType.name()).append("</Type>");
236-
if (this.outputContainerUri != null)
237-
buf.append("<OutputContainerUri>").append(this.outputContainerUri).append("</OutputContainerUri>");
238-
if (this.importFileUri != null) buf.append("<ImportFileUri>").append(this.importFileUri).append("</ImportFileUri>");
238+
if (this.jobType != null) {
239+
buf.append("<Type>").append(this.jobType.name()).append("</Type>");
240+
}
241+
if (this.outputContainerUri != null) {
242+
buf.append("<OutputContainerUri><![CDATA[").append(this.outputContainerUri).append("]]></OutputContainerUri>");
243+
}
244+
if (this.importFileUri != null) {
245+
buf.append("<ImportFileUri>").append(this.importFileUri).append("</ImportFileUri>");
246+
}
239247
buf.append(XML_FOOTER);
240248
return buf.toString();
241249
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package com.windowsazure.messaging;public class NotificationHubSendTest {
2+
}

0 commit comments

Comments
 (0)