|
From: <cy...@us...> - 2003-07-11 03:48:15
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging
In directory sc8-pr-cvs1:/tmp/cvs-serv7647
Modified Files:
EbxmlMessage.java
Log Message:
Change MIME boundary to be a static String.
Index: EbxmlMessage.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** EbxmlMessage.java 17 Jun 2003 04:28:01 -0000 1.29
--- EbxmlMessage.java 11 Jul 2003 03:48:12 -0000 1.30
***************
*** 103,106 ****
--- 103,111 ----
public static final String SOAP_PART_CONTENT_ID = "soappart";
+ /**
+ * MIME boundary generated
+ */
+ public static final String mimeBoundary = "----=_BOUNDARY_01";
+
public static boolean needPatch = false;
***************
*** 159,167 ****
private String filename;
- /**
- * MIME boundary generated
- */
- private String mimeBoundary;
-
/** Constructs an <code>EbxmlMessage</code> using the default JAXM
<code>MessageFactory</code> implementation
--- 164,167 ----
***************
*** 1053,1057 ****
if (getPayloadCount() > 0) {
contentType = Constants.MULTIPART_RELATED_TYPE
! + "\"" + getMimeBoundary() + "\"; "
+ Constants.CHARACTER_SET + "=\""
+ Constants.CHARACTER_ENCODING + "\"; "
--- 1053,1057 ----
if (getPayloadCount() > 0) {
contentType = Constants.MULTIPART_RELATED_TYPE
! + "\"" + mimeBoundary + "\"; "
+ Constants.CHARACTER_SET + "=\""
+ Constants.CHARACTER_ENCODING + "\"; "
***************
*** 1126,1135 ****
}
- String boundary = getMimeBoundary();
String buffer;
byte[] bytes;
// print SOAP part
! buffer = Constants.MIME_BOUNDARY_PREFIX + boundary + Constants.CRLF;
buffer = buffer + Constants.CONTENT_TYPE + ": "
+ Constants.TEXT_XML_TYPE + Constants.CRLF;
--- 1126,1134 ----
}
String buffer;
byte[] bytes;
// print SOAP part
! buffer = Constants.MIME_BOUNDARY_PREFIX + mimeBoundary + Constants.CRLF;
buffer = buffer + Constants.CONTENT_TYPE + ": "
+ Constants.TEXT_XML_TYPE + Constants.CRLF;
***************
*** 1159,1163 ****
PayloadContainer pc = (PayloadContainer) i.next();
! buffer = Constants.MIME_BOUNDARY_PREFIX + boundary + Constants.CRLF;
buffer = buffer + Constants.CONTENT_TYPE + ": "
+ pc.getContentType() + Constants.CRLF;
--- 1158,1163 ----
PayloadContainer pc = (PayloadContainer) i.next();
! buffer = Constants.MIME_BOUNDARY_PREFIX + mimeBoundary +
! Constants.CRLF;
buffer = buffer + Constants.CONTENT_TYPE + ": "
+ pc.getContentType() + Constants.CRLF;
***************
*** 1209,1213 ****
// print last boundary
! buffer = Constants.MIME_BOUNDARY_PREFIX + boundary + "--"
+ Constants.CRLF;
bytes = buffer.getBytes(Constants.CHARACTER_ENCODING);
--- 1209,1213 ----
// print last boundary
! buffer = Constants.MIME_BOUNDARY_PREFIX + mimeBoundary + "--"
+ Constants.CRLF;
bytes = buffer.getBytes(Constants.CHARACTER_ENCODING);
***************
*** 1252,1262 ****
// soapMessage.writeTo(out);
serialize(out, soapEncoding, payloadEncoding, false);
- }
-
- public String getMimeBoundary() {
- if (mimeBoundary == null) {
- mimeBoundary = "----=_BOUNDARY_01";
- }
- return mimeBoundary;
}
--- 1252,1255 ----
|