|
From: <cy...@us...> - 2003-07-26 15:18:15
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv15893
Modified Files:
Tag: b0931
MessageServer.java
Log Message:
Bug fix for digital signature.
Index: MessageServer.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServer.java,v
retrieving revision 1.119.2.11
retrieving revision 1.119.2.12
diff -C2 -d -r1.119.2.11 -r1.119.2.12
*** MessageServer.java 25 Jul 2003 16:13:50 -0000 1.119.2.11
--- MessageServer.java 26 Jul 2003 15:18:12 -0000 1.119.2.12
***************
*** 3433,3436 ****
--- 3433,3438 ----
final PushbackInputStream fileStream = new PushbackInputStream(fis);
String boundary = null;
+ int soapMessageFileOffset = 0;
+ int soapMessageLength = 0;
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] line = readLine(fileStream);
***************
*** 3445,3448 ****
--- 3447,3451 ----
}
byte[] soapMessageBytes = out.toByteArray();
+ soapMessageLength = soapMessageBytes.length;
int lastIndex = soapMessageBytes.length - 1;
***************
*** 3478,3481 ****
--- 3481,3485 ----
with offset being the beginning position
*/
+ soapMessageFileOffset = (int) offset;
out = new ByteArrayOutputStream();
line = readLine(fileStream);
***************
*** 3499,3502 ****
--- 3503,3507 ----
soapMessageBytes = out.toByteArray();
+ soapMessageLength = soapMessageBytes.length;
lastIndex = soapMessageBytes.length - 1;
for ( ; lastIndex >= 0 ; lastIndex--) {
***************
*** 3669,3672 ****
--- 3674,3679 ----
if (withAttachments) {
EbxmlMessage message = new EbxmlMessage(soapMessage);
+ message.setSOAPMessageFileOffset
+ (soapMessageFileOffset, soapMessageLength);
message.setFileName(file.getCanonicalPath());
logger.debug("<= MessageServer.getMessageFromFile");
|