You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(44) |
Aug
(98) |
Sep
(97) |
Oct
(130) |
Nov
(118) |
Dec
(102) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(139) |
Feb
(74) |
Mar
(128) |
Apr
(104) |
May
(121) |
Jun
(32) |
Jul
(29) |
Aug
(9) |
Sep
(16) |
Oct
|
Nov
(11) |
Dec
(29) |
| 2004 |
Jan
(15) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(9) |
Sep
(2) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
| 2005 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
|
May
(1) |
Jun
(5) |
Jul
|
Aug
(12) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2006 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(5) |
Nov
(5) |
Dec
|
| 2007 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <bob...@us...> - 2003-12-31 03:45:53
|
Update of /cvsroot/ebxmlms/ebxmlms/src_junit/hk/hku/cecid/phoenix In directory sc8-pr-cvs1:/tmp/cvs-serv31786/phoenix Log Message: Directory /cvsroot/ebxmlms/ebxmlms/src_junit/hk/hku/cecid/phoenix added to the repository --> Using per-directory sticky tag `b0931' |
|
From: <bob...@us...> - 2003-12-31 03:45:37
|
Update of /cvsroot/ebxmlms/ebxmlms/src_junit/hk/hku/cecid In directory sc8-pr-cvs1:/tmp/cvs-serv31762/cecid Log Message: Directory /cvsroot/ebxmlms/ebxmlms/src_junit/hk/hku/cecid added to the repository --> Using per-directory sticky tag `b0931' |
|
From: <bob...@us...> - 2003-12-31 03:45:23
|
Update of /cvsroot/ebxmlms/ebxmlms/src_junit/hk/hku In directory sc8-pr-cvs1:/tmp/cvs-serv31728/hku Log Message: Directory /cvsroot/ebxmlms/ebxmlms/src_junit/hk/hku added to the repository --> Using per-directory sticky tag `b0931' |
|
From: <bob...@us...> - 2003-12-31 03:23:39
|
Update of /cvsroot/ebxmlms/ebxmlms/src_junit/hk In directory sc8-pr-cvs1:/tmp/cvs-serv28802/hk Log Message: Directory /cvsroot/ebxmlms/ebxmlms/src_junit/hk added to the repository --> Using per-directory sticky tag `b0931' |
|
From: <bob...@us...> - 2003-12-31 03:22:06
|
Update of /cvsroot/ebxmlms/ebxmlms/src_junit In directory sc8-pr-cvs1:/tmp/cvs-serv28609/src_junit Log Message: Directory /cvsroot/ebxmlms/ebxmlms/src_junit added to the repository --> Using per-directory sticky tag `b0931' |
|
From: <bob...@us...> - 2003-12-31 03:02:28
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki
In directory sc8-pr-cvs1:/tmp/cvs-serv25391/src/hk/hku/cecid/phoenix/pki
Modified Files:
Tag: b0931
ApacheXMLDSigner.java
Log Message:
During EbxmlMessage.verify(),
when the certificates returned by certResolver is null,
it will cosider as verify successful in previous version.
Now it will throw VerifyException in such case.
VerifyException will also be thrown if certResolver is null but
the cert path cannot be verified in the logic due to null trusted
keystore or 1.3 Java version
Index: ApacheXMLDSigner.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/ApacheXMLDSigner.java,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -C2 -d -r1.4.2.5 -r1.4.2.6
*** ApacheXMLDSigner.java 2 Jun 2003 02:29:51 -0000 1.4.2.5
--- ApacheXMLDSigner.java 31 Dec 2003 03:02:24 -0000 1.4.2.6
***************
*** 475,479 ****
--- 475,489 ----
if (certResolver != null) {
certs = certResolver.resolve(obj);
+ if (certs == null || certs.length <= 0) {
+ String err = "Certificates returned by certResolver is null";
+ logger.warn(err);
+ throws new VerifyException(err);
+ }
+ } else if (trusted == null || javaVersion < 1.4) {
+ String err = "Cannot verify cert path, but certResolver is null";
+ logger.warn(err);
+ throws new VerifyException;
}
+
KeyInfo keyInfo = null;
PublicKey publicKey = null;
***************
*** 545,550 ****
ret = CertPathVerifier.verify(certs, trusted);
logger.debug("verified, result: " + ret);
! }
! else {
logger.debug("verification of cert path skipped");
}
--- 555,559 ----
ret = CertPathVerifier.verify(certs, trusted);
logger.debug("verified, result: " + ret);
! } else {
logger.debug("verification of cert path skipped");
}
|
|
From: <bob...@us...> - 2003-12-15 09:51:38
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport
In directory sc8-pr-cvs1:/tmp/cvs-serv20508/src/hk/hku/cecid/phoenix/message/transport
Modified Files:
Http.java Mail.java
Log Message:
Take out soap envelope parsing logic from
Message.getMessageFromDataSource() to form
another method parseSoapEnvelopeOnly().
Change Http.send() to return a EbxmlMessage rather than a soap message
Store the byte array of soap envelope when received my Http and Mail,
and also change the signature verification logic to read those byte array.
It will fix the bug on signature verification of a non "soap-env" namespace
message received from Sync Reply channel.
Index: Http.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Http.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Http.java 11 Dec 2003 06:41:30 -0000 1.11
--- Http.java 15 Dec 2003 09:51:35 -0000 1.12
***************
*** 78,81 ****
--- 78,82 ----
import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
import hk.hku.cecid.phoenix.message.handler.InitializationException;
+ import hk.hku.cecid.phoenix.message.handler.MessageServer;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.pki.KeyStoreKeyManager;
***************
*** 309,313 ****
* @throws TransportException
*/
! public static SOAPMessage send(EbxmlMessage message, String toUrl)
throws TransportException {
--- 310,314 ----
* @throws TransportException
*/
! public static EbxmlMessage send(EbxmlMessage message, String toUrl)
throws TransportException {
***************
*** 363,367 ****
message.getMimeHeaders().setHeader(Constants.CONTENT_TYPE, type);
*/
! SOAPMessage responseMessage = null;
try {
URL url = new URL(toUrl);
--- 364,368 ----
message.getMimeHeaders().setHeader(Constants.CONTENT_TYPE, type);
*/
! EbxmlMessage responseMessage = null;
try {
URL url = new URL(toUrl);
***************
*** 480,486 ****
if (bytes.length > 0) {
! responseMessage = MessageFactory.newInstance().
! createMessage(mimeHeaders,
! new ByteArrayInputStream(bytes));
}
}
--- 481,493 ----
if (bytes.length > 0) {
! SOAPMessage responseSoapMessage
! = MessageFactory.newInstance().createMessage(
! mimeHeaders, new ByteArrayInputStream(
! bytes));
! byte[] soapEnvelope
! = MessageServer.getSoapEnvelopeBytesFromStream(
! new ByteArrayInputStream(bytes));
! responseMessage = new EbxmlMessage(responseSoapMessage);
! responseMessage.setSoapEnvelopeBytes(soapEnvelope);
}
}
Index: Mail.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Mail.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** Mail.java 11 Dec 2003 06:41:30 -0000 1.42
--- Mail.java 15 Dec 2003 09:51:35 -0000 1.43
***************
*** 70,73 ****
--- 70,74 ----
import hk.hku.cecid.phoenix.common.util.Property;
+ import hk.hku.cecid.phoenix.message.handler.MessageServer;
import hk.hku.cecid.phoenix.message.handler.Constants;
import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
***************
*** 783,788 ****
mimeHeaders, messages[i].getInputStream());
}
!
! ebxmlMessages.add(new EbxmlMessage(soapMessage));
messages[i].setFlag(Flags.Flag.DELETED, true);
}
--- 784,793 ----
mimeHeaders, messages[i].getInputStream());
}
! byte[] soapEnvelopeBytes
! = MessageServer.getSoapEnvelopeBytesFromStream(
! messages[i].getInputStream());
! EbxmlMessage ebxmlMessage = new EbxmlMessage(soapMessage);
! ebxmlMessage.setSoapEnvelopeBytes(soapEnvelopeBytes);
! ebxmlMessages.add(ebxmlMessage);
messages[i].setFlag(Flags.Flag.DELETED, true);
}
|
|
From: <bob...@us...> - 2003-12-15 09:51:38
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging
In directory sc8-pr-cvs1:/tmp/cvs-serv20508/src/hk/hku/cecid/phoenix/message/packaging
Modified Files:
EbxmlMessage.java PKISignatureImpl.java
Log Message:
Take out soap envelope parsing logic from
Message.getMessageFromDataSource() to form
another method parseSoapEnvelopeOnly().
Change Http.send() to return a EbxmlMessage rather than a soap message
Store the byte array of soap envelope when received my Http and Mail,
and also change the signature verification logic to read those byte array.
It will fix the bug on signature verification of a non "soap-env" namespace
message received from Sync Reply channel.
Index: EbxmlMessage.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** EbxmlMessage.java 11 Dec 2003 06:41:29 -0000 1.39
--- EbxmlMessage.java 15 Dec 2003 09:51:34 -0000 1.40
***************
*** 182,185 ****
--- 182,187 ----
private int soapMessageLength;
+
+ private byte[] soapEnvelopeBytes = null;
/**
***************
*** 1578,1581 ****
--- 1580,1598 ----
public String getFileName() {
return filename;
+ }
+
+ /**
+ * Get the soap envelope in bytes
+ */
+ public byte[] getSoapEnvelopeBytes() {
+ return soapEnvelopeBytes;
+ }
+
+ /**
+ * set the soap envelope in bytes. This bytes will be used to verify
+ * the signature.
+ */
+ public void setSoapEnvelopeBytes(byte[] soapEnvelopeBytes) {
+ this.soapEnvelopeBytes = soapEnvelopeBytes;
}
}
Index: PKISignatureImpl.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/PKISignatureImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** PKISignatureImpl.java 11 Dec 2003 06:41:29 -0000 1.12
--- PKISignatureImpl.java 15 Dec 2003 09:51:35 -0000 1.13
***************
*** 255,259 ****
ByteArrayOutputStream baos = new ByteArrayOutputStream();
String fileName = ebxmlMessage.getFileName();
! if (fileName != null) {
FileInputStream fis = new FileInputStream(fileName);
int skipped = ebxmlMessage.getSOAPMessageFileOffset()[0];
--- 255,262 ----
ByteArrayOutputStream baos = new ByteArrayOutputStream();
String fileName = ebxmlMessage.getFileName();
! byte[] soapEnvelopeBytes = ebxmlMessage.getSoapEnvelopeBytes();
! if (soapEnvelopeBytes != null) {
! baos.write(soapEnvelopeBytes);
! } else if (fileName != null) {
FileInputStream fis = new FileInputStream(fileName);
int skipped = ebxmlMessage.getSOAPMessageFileOffset()[0];
|
|
From: <bob...@us...> - 2003-12-15 09:51:38
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv20508/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
HttpSender.java MessageServer.java
Log Message:
Take out soap envelope parsing logic from
Message.getMessageFromDataSource() to form
another method parseSoapEnvelopeOnly().
Change Http.send() to return a EbxmlMessage rather than a soap message
Store the byte array of soap envelope when received my Http and Mail,
and also change the signature verification logic to read those byte array.
It will fix the bug on signature verification of a non "soap-env" namespace
message received from Sync Reply channel.
Index: HttpSender.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/HttpSender.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** HttpSender.java 11 Dec 2003 06:41:29 -0000 1.16
--- HttpSender.java 15 Dec 2003 09:51:34 -0000 1.17
***************
*** 135,144 ****
//final SOAPMessage soapMessage = HttpServlet.
// send(ebxmlMessage.getSOAPMessage(), toMshUrl.toString());
! final SOAPMessage soapMessage = Http.
! send(ebxmlMessage, toMshUrl.toString());
successful = true;
if (soapMessage != null) {
responseMessage = new EbxmlMessage(soapMessage);
! }
}
catch (TransportException te) {
--- 135,144 ----
//final SOAPMessage soapMessage = HttpServlet.
// send(ebxmlMessage.getSOAPMessage(), toMshUrl.toString());
! responseMessage = Http.send(ebxmlMessage, toMshUrl.toString());
successful = true;
+ /*
if (soapMessage != null) {
responseMessage = new EbxmlMessage(soapMessage);
! }*/
}
catch (TransportException te) {
***************
*** 146,149 ****
--- 146,150 ----
exceptionMessage = te.getMessage();
}
+ /*
catch (SOAPException e) {
exceptionMessage = ErrorMessages.getMessage
***************
*** 152,155 ****
--- 153,157 ----
logger.error(exceptionMessage);
}
+ */
catch (Exception e) {
exceptionMessage = ErrorMessages.getMessage
Index: MessageServer.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServer.java,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** MessageServer.java 11 Dec 2003 06:41:29 -0000 1.143
--- MessageServer.java 15 Dec 2003 09:51:34 -0000 1.144
***************
*** 3542,3546 ****
* @param file the file that contain the message.
* @return the ebxmlmessage deserialized from the file.
! * @throws MessageServerException Description of the Exception
*/
static EbxmlMessage getMessageFromFile(File file)
--- 3542,3546 ----
* @param file the file that contain the message.
* @return the ebxmlmessage deserialized from the file.
! * @throws MessageServerException throw if there is error on parsing
*/
static EbxmlMessage getMessageFromFile(File file)
***************
*** 3548,3551 ****
--- 3548,3600 ----
return (EbxmlMessage) getMessageFromFile(file, true);
}
+
+ /**
+ * parse the message from InputStream and get the byte array of SOAP
+ * Envelope
+ * @param stream the InputStream contains the message
+ * @return the byte array of the Soap Envelope
+ * @throws MessageServerException throw if there is error on parsing
+ */
+ public static byte[] getSoapEnvelopeBytesFromStream(InputStream stream)
+ throws MessageServerException {
+ InputStream pStream = null;
+ try {
+ MessageSemiParsedOutput parsedOutput
+ = parseSoapEnvelopeOnly(stream);
+ pStream = parsedOutput.getInputStream();
+ return parsedOutput.getSoapMessageBytes();
+ } catch (IOException e) {
+ e.printStackTrace();
+ String err = ErrorMessages.getMessage(
+ ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e);
+ logger.error(err);
+ throw new MessageServerException(err);
+ } catch (MessageServerException e) {
+ throw e;
+ } finally {
+ if (pStream != null) {
+ try {
+ pStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ String err = ErrorMessages.getMessage(
+ ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e);
+ logger.error(err);
+ throw new MessageServerException(err);
+ }
+ }
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ String err = ErrorMessages.getMessage(
+ ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e);
+ logger.error(err);
+ throw new MessageServerException(err);
+ }
+ }
+ }
+ }
/**
***************
*** 3597,3684 ****
try {
fis = dataSource.getInputStream();
! fileStream = new PushbackInputStream(fis);
! String boundary = null;
! int soapMessageFileOffset = 0;
! int soapMessageLength = 0;
! ByteArrayOutputStream out = new ByteArrayOutputStream();
! byte[] line = readLine(fileStream);
! long offset = line.length;
! String s = new String(line);
! while (line.length > 0 &&
! !(s.startsWith(Constants.MIME_BOUNDARY_PREFIX))) {
! out.write(line);
! line = readLine(fileStream);
! offset += line.length;
! s = new String(line);
! }
! byte[] soapMessageBytes = out.toByteArray();
! soapMessageLength = soapMessageBytes.length;
! int lastIndex = soapMessageBytes.length - 1;
!
! if (line.length > 0) {
! lastIndex = line.length - 1;
! for (; lastIndex >= 0; lastIndex--) {
! if (line[lastIndex] != 0xA && line[lastIndex] != 0xD) {
! break;
! }
! }
! boundary = new String(line,
! Constants.MIME_BOUNDARY_PREFIX.length(),
! lastIndex - Constants.MIME_BOUNDARY_PREFIX.length() + 1);
!
! /*
! * Find the empty line delimiter separating the MIME header and
! * the SOAPPart content
! */
! line = readLine(fileStream);
! offset += line.length;
! while (line.length > 0 && line[0] != 0xA && line[0] != 0xD) {
! line = readLine(fileStream);
! offset += line.length;
! }
! if (line.length == 0) {
! String err = ErrorMessages.getMessage(
! ErrorMessages.ERR_HERMES_FILE_IO_ERROR,
! "missing empty line delimiter of MIME header");
! logger.warn(err);
! throw new MessageServerException(err);
! }
!
! /*
! * Find the location and the length of the SOAPPart content
! * with offset being the beginning position
! */
! soapMessageFileOffset = (int) offset;
! out = new ByteArrayOutputStream();
! line = readLine(fileStream);
! offset += line.length;
! s = new String(line);
! while (line.length > 0 && !(s.startsWith
! (Constants.MIME_BOUNDARY_PREFIX + boundary))) {
! out.write(line);
! line = readLine(fileStream);
! offset += line.length;
! s = new String(line);
! }
!
! if (line.length == 0) {
! String err = ErrorMessages.getMessage(
! ErrorMessages.ERR_HERMES_FILE_IO_ERROR,
! "missing ending MIME boundary");
! logger.warn(err);
! throw new MessageServerException(err);
! }
!
! soapMessageBytes = out.toByteArray();
! soapMessageLength = soapMessageBytes.length;
! lastIndex = soapMessageBytes.length - 1;
! for (; lastIndex >= 0; lastIndex--) {
! if (soapMessageBytes[lastIndex] != 0xA &&
! soapMessageBytes[lastIndex] != 0xD) {
! break;
! }
! }
! }
!
final MimeHeaders headers = new MimeHeaders();
headers.addHeader(Constants.CONTENT_TYPE, Constants.TEXT_XML_TYPE);
--- 3646,3656 ----
try {
fis = dataSource.getInputStream();
! MessageSemiParsedOutput parsedOutput = parseSoapEnvelopeOnly(fis);
! fileStream = parsedOutput.getInputStream();
! int soapMessageFileOffset = parsedOutput.getSoapMessageOffset();
! byte[] soapMessageBytes = parsedOutput.getSoapMessageBytes();
! int soapMessageLength = soapMessageBytes.length;
! int lastIndex = parsedOutput.getLastIndex();
! String boundary = parsedOutput.getBoundary();
final MimeHeaders headers = new MimeHeaders();
headers.addHeader(Constants.CONTENT_TYPE, Constants.TEXT_XML_TYPE);
***************
*** 3697,3700 ****
--- 3669,3674 ----
ArrayList payloads = new ArrayList();
if (boundary != null && withAttachments) {
+ byte[] line = parsedOutput.getLastLine();
+ long offset = parsedOutput.getOffset();
lastIndex = line.length - 1;
for (; lastIndex >= 0; lastIndex--) {
***************
*** 3703,3707 ****
}
}
! s = new String(line, 0, lastIndex + 1);
while (!s.endsWith(boundary + Constants.MIME_BOUNDARY_PREFIX)) {
--- 3677,3681 ----
}
}
! String s = new String(line, 0, lastIndex + 1);
while (!s.endsWith(boundary + Constants.MIME_BOUNDARY_PREFIX)) {
***************
*** 4122,4125 ****
--- 4096,4263 ----
public static boolean isDelivered(int sequenceNumber) {
return sequenceNumber <= FIRST_MESSAGE_DELIVERED;
+ }
+
+ /**
+ * The function which parse the soap envelope only from the inputstream.
+ */
+ private static MessageSemiParsedOutput parseSoapEnvelopeOnly(
+ InputStream fis) throws IOException, MessageServerException {
+ PushbackInputStream fileStream = new PushbackInputStream(fis);
+ String boundary = null;
+ int soapMessageFileOffset = 0;
+ int soapMessageLength = 0;
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ byte[] line = readLine(fileStream);
+ long offset = line.length;
+ String s = new String(line);
+ while (line.length > 0 &&
+ !(s.startsWith(Constants.MIME_BOUNDARY_PREFIX))) {
+ out.write(line);
+ line = readLine(fileStream);
+ offset += line.length;
+ s = new String(line);
+ }
+ byte[] soapMessageBytes = out.toByteArray();
+ soapMessageLength = soapMessageBytes.length;
+ int lastIndex = soapMessageBytes.length - 1;
+
+ if (line.length > 0) {
+ lastIndex = line.length - 1;
+ for (; lastIndex >= 0; lastIndex--) {
+ if (line[lastIndex] != 0xA && line[lastIndex] != 0xD) {
+ break;
+ }
+ }
+ boundary = new String(line,
+ Constants.MIME_BOUNDARY_PREFIX.length(),
+ lastIndex - Constants.MIME_BOUNDARY_PREFIX.length() + 1);
+
+ /*
+ * Find the empty line delimiter separating the MIME header and
+ * the SOAPPart content
+ */
+ line = readLine(fileStream);
+ offset += line.length;
+ while (line.length > 0 && line[0] != 0xA && line[0] != 0xD) {
+ line = readLine(fileStream);
+ offset += line.length;
+ }
+ if (line.length == 0) {
+ String err = ErrorMessages.getMessage(
+ ErrorMessages.ERR_HERMES_FILE_IO_ERROR,
+ "missing empty line delimiter of MIME header");
+ logger.warn(err);
+ throw new MessageServerException(err);
+ }
+
+ /*
+ * Find the location and the length of the SOAPPart content
+ * with offset being the beginning position
+ */
+ soapMessageFileOffset = (int) offset;
+ out = new ByteArrayOutputStream();
+ line = readLine(fileStream);
+ offset += line.length;
+ s = new String(line);
+ while (line.length > 0 && !(s.startsWith
+ (Constants.MIME_BOUNDARY_PREFIX + boundary))) {
+ out.write(line);
+ line = readLine(fileStream);
+ offset += line.length;
+ s = new String(line);
+ }
+
+ if (line.length == 0) {
+ String err = ErrorMessages.getMessage(
+ ErrorMessages.ERR_HERMES_FILE_IO_ERROR,
+ "missing ending MIME boundary");
+ logger.warn(err);
+ throw new MessageServerException(err);
+ }
+ soapMessageBytes = out.toByteArray();
+ soapMessageLength = soapMessageBytes.length;
+ lastIndex = soapMessageBytes.length - 1;
+ for (; lastIndex >= 0; lastIndex--) {
+ if (soapMessageBytes[lastIndex] != 0xA &&
+ soapMessageBytes[lastIndex] != 0xD) {
+ break;
+ }
+ }
+ }
+ return new MessageSemiParsedOutput(fileStream, lastIndex,
+ soapMessageBytes, soapMessageFileOffset, boundary, line,
+ offset);
+ }
+
+ /**
+ * class represent the data returned from the parseSoapEnvelopeOnly
+ */
+ private static class MessageSemiParsedOutput {
+ private PushbackInputStream istream;
+ private byte[] soapMessage;
+ private int soapMessageOffset;
+ private String boundary;
+ private int lastIndex;
+ private byte[] endLine;
+ private long offset;
+ public MessageSemiParsedOutput(PushbackInputStream istream,
+ int lastIndex, byte[] soapMessage, int soapMessageOffset,
+ String boundary, byte[] endLine, long offset) {
+ this.istream = istream;
+ this.soapMessage = soapMessage;
+ this.soapMessageOffset = soapMessageOffset;
+ this.boundary = boundary;
+ this.lastIndex = lastIndex;
+ this.endLine = endLine;
+ this.offset = offset;
+ }
+
+ /**
+ * get the offset up on parsing
+ */
+ public long getOffset() {
+ return offset;
+ }
+
+ /**
+ * get the last line up on parsing
+ */
+ public byte[] getLastLine() {
+ return endLine;
+ }
+
+ /**
+ * get the last index to read the soap message
+ */
+ public int getLastIndex() {
+ return lastIndex;
+ }
+ /**
+ * get the remain stream which is not parsed
+ */
+ public PushbackInputStream getInputStream() {
+ return istream;
+ }
+
+ /**
+ * get the byte array that contains the soap message
+ */
+ public byte[] getSoapMessageBytes() {
+ return soapMessage;
+ }
+
+ /**
+ * get the soap message offset from the started stream
+ */
+ public int getSoapMessageOffset() {
+ return soapMessageOffset;
+ }
+
+ /**
+ * get the mime boundary
+ */
+ public String getBoundary() {
+ return boundary;
+ }
}
}
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging
In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/message/packaging
Modified Files:
AckRequested.java Acknowledgment.java
AttachmentDataSource.java AttachmentResolver.java
BodyElement.java EbxmlMessage.java EbxmlMessageFactory.java
Element.java ErrorList.java ExtensionElement.java
ExtensionElementImpl.java HeaderContainer.java
HeaderElement.java Manifest.java MessageHeader.java
MessageOrder.java PKISignatureImpl.java
PartialInputStream.java PayloadContainer.java Reference.java
Signature.java SignatureReference.java StatusRequest.java
StatusResponse.java SyncReply.java
Log Message:
Remove all unused imports.
convert all wildcard imports to non-wildcard imports.
Index: AckRequested.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/AckRequested.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AckRequested.java 18 Jun 2003 09:14:43 -0000 1.7
--- AckRequested.java 11 Dec 2003 06:41:29 -0000 1.8
***************
*** 72,76 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An ebXML <code>AckRequested</code> in the SOAP Header of a
--- 72,75 ----
***************
*** 80,84 ****
* @version $Revision$
*/
-
public class AckRequested extends HeaderElement {
--- 79,82 ----
Index: Acknowledgment.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Acknowledgment.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Acknowledgment.java 17 Nov 2003 02:09:33 -0000 1.9
--- Acknowledgment.java 11 Dec 2003 06:41:29 -0000 1.10
***************
*** 77,81 ****
import javax.xml.soap.SOAPException;
import javax.xml.soap.Text;
-
/**
* An ebXML <code>Acknowledgment</code> in the SOAP Header of a
--- 77,80 ----
***************
*** 85,89 ****
* @version $Revision$
*/
-
public class Acknowledgment extends HeaderElement {
--- 84,87 ----
Index: AttachmentDataSource.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/AttachmentDataSource.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AttachmentDataSource.java 9 Dec 2003 08:59:10 -0000 1.10
--- AttachmentDataSource.java 11 Dec 2003 06:41:29 -0000 1.11
***************
*** 69,77 ****
package hk.hku.cecid.phoenix.message.packaging;
! import java.io.*;
import javax.activation.DataSource;
import javax.mail.MessagingException;
import javax.mail.internet.MimeUtility;
-
/**
* This is an implementation of <code>javax.activation.DataSource</code>
--- 69,82 ----
package hk.hku.cecid.phoenix.message.packaging;
! import java.io.ByteArrayInputStream;
! import java.io.ByteArrayOutputStream;
! import java.io.File;
! import java.io.FileInputStream;
! import java.io.IOException;
! import java.io.InputStream;
! import java.io.OutputStream;
import javax.activation.DataSource;
import javax.mail.MessagingException;
import javax.mail.internet.MimeUtility;
/**
* This is an implementation of <code>javax.activation.DataSource</code>
***************
*** 81,85 ****
* @version $Revision$
*/
-
public class AttachmentDataSource implements DataSource {
--- 86,89 ----
Index: AttachmentResolver.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/AttachmentResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AttachmentResolver.java 9 Apr 2003 07:48:18 -0000 1.3
--- AttachmentResolver.java 11 Dec 2003 06:41:29 -0000 1.4
***************
*** 69,77 ****
package hk.hku.cecid.phoenix.message.packaging;
- import org.w3c.dom.Attr;
import org.apache.xml.security.signature.XMLSignatureInput;
import org.apache.xml.security.utils.resolver.ResourceResolverException;
import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
!
/**
* A <code>ResourceResolver</code> implementation used by Apache Security
--- 69,76 ----
package hk.hku.cecid.phoenix.message.packaging;
import org.apache.xml.security.signature.XMLSignatureInput;
import org.apache.xml.security.utils.resolver.ResourceResolverException;
import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
! import org.w3c.dom.Attr;
/**
* A <code>ResourceResolver</code> implementation used by Apache Security
***************
*** 85,89 ****
* @version $Revision$
*/
-
class AttachmentResolver extends ResourceResolverSpi {
--- 84,87 ----
Index: BodyElement.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/BodyElement.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** BodyElement.java 10 Jun 2003 02:22:48 -0000 1.6
--- BodyElement.java 11 Dec 2003 06:41:29 -0000 1.7
***************
*** 72,76 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An <code>ExtensionElement</code> in the SOAP Body of a
--- 72,75 ----
***************
*** 80,84 ****
* @version $Revision$
*/
-
class BodyElement extends ExtensionElementImpl {
--- 79,82 ----
Index: EbxmlMessage.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** EbxmlMessage.java 9 Dec 2003 08:59:10 -0000 1.38
--- EbxmlMessage.java 11 Dec 2003 06:41:29 -0000 1.39
***************
*** 67,71 ****
*/
package hk.hku.cecid.phoenix.message.packaging;
! import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
--- 67,82 ----
*/
package hk.hku.cecid.phoenix.message.packaging;
! import hk.hku.cecid.phoenix.message.handler.Constants;
! import hk.hku.cecid.phoenix.message.handler.MessageServer;
! import hk.hku.cecid.phoenix.message.handler.MessageServerException;
! import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
! import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
! import hk.hku.cecid.phoenix.pki.CertResolver;
! import java.io.ByteArrayInputStream;
! import java.io.ByteArrayOutputStream;
! import java.io.File;
! import java.io.IOException;
! import java.io.InputStream;
! import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
***************
*** 75,86 ****
import javax.activation.FileDataSource;
import javax.mail.internet.MimeUtility;
! import javax.xml.soap.*;
! import hk.hku.cecid.phoenix.message.handler.Constants;
! import hk.hku.cecid.phoenix.message.handler.MessageServer;
! import hk.hku.cecid.phoenix.message.handler.MessageServerException;
! import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
! import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
! import hk.hku.cecid.phoenix.pki.CertResolver;
!
/**
* A representation of an ebXML message. An ebXML message conforms to the
--- 86,97 ----
import javax.activation.FileDataSource;
import javax.mail.internet.MimeUtility;
! import javax.xml.soap.AttachmentPart;
! import javax.xml.soap.MessageFactory;
! import javax.xml.soap.MimeHeader;
! import javax.xml.soap.MimeHeaders;
! import javax.xml.soap.SOAPEnvelope;
! import javax.xml.soap.SOAPException;
! import javax.xml.soap.SOAPMessage;
! import javax.xml.soap.SOAPPart;
/**
* A representation of an ebXML message. An ebXML message conforms to the
***************
*** 92,96 ****
* @version $Revision$
*/
-
public class EbxmlMessage {
--- 103,106 ----
Index: EbxmlMessageFactory.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessageFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** EbxmlMessageFactory.java 9 Apr 2003 07:48:20 -0000 1.6
--- EbxmlMessageFactory.java 11 Dec 2003 06:41:29 -0000 1.7
***************
*** 69,79 ****
package hk.hku.cecid.phoenix.message.packaging;
- import java.io.InputStream;
import java.io.IOException;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-
/**
* Implementation of <code>javax.xml.soap.MessageFactory</code>
--- 69,78 ----
package hk.hku.cecid.phoenix.message.packaging;
import java.io.IOException;
+ import java.io.InputStream;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
/**
* Implementation of <code>javax.xml.soap.MessageFactory</code>
***************
*** 82,86 ****
* @version $Revision$
*/
-
public class EbxmlMessageFactory extends MessageFactory {
--- 81,84 ----
Index: Element.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Element.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Element.java 16 Jul 2003 08:54:10 -0000 1.4
--- Element.java 11 Dec 2003 06:41:29 -0000 1.5
***************
*** 73,77 ****
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
-
/**
* Encapsulation of a <code>javax.xml.soap.SOAPElement</code>
--- 73,76 ----
***************
*** 80,84 ****
* @version $Revision$
*/
-
interface Element {
--- 79,82 ----
Index: ErrorList.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/ErrorList.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ErrorList.java 3 Jul 2003 02:31:17 -0000 1.10
--- ErrorList.java 11 Dec 2003 06:41:29 -0000 1.11
***************
*** 69,72 ****
--- 69,73 ----
package hk.hku.cecid.phoenix.message.packaging;
+ import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
import java.util.ArrayList;
import java.util.Iterator;
***************
*** 75,80 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
- import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
-
/**
* An ebXML <code>ErrorList</code> in the SOAP Header of a
--- 76,79 ----
***************
*** 84,88 ****
* @version $Revision$
*/
-
public class ErrorList extends HeaderElement {
--- 83,86 ----
Index: ExtensionElement.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/ExtensionElement.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ExtensionElement.java 9 Apr 2003 07:48:21 -0000 1.9
--- ExtensionElement.java 11 Dec 2003 06:41:29 -0000 1.10
***************
*** 71,75 ****
import java.util.Iterator;
import javax.xml.soap.SOAPException;
-
/**
* An <code>ExtensionElement</code> in the <code>HeaderContainer</code>
--- 71,74 ----
***************
*** 78,82 ****
* @version $Revision$
*/
-
interface ExtensionElement extends Element {
--- 77,80 ----
Index: ExtensionElementImpl.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/ExtensionElementImpl.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ExtensionElementImpl.java 16 Jul 2003 08:54:10 -0000 1.9
--- ExtensionElementImpl.java 11 Dec 2003 06:41:29 -0000 1.10
***************
*** 71,76 ****
import java.util.ArrayList;
import java.util.Iterator;
! import javax.xml.soap.*;
!
/**
* An implementation of <code>ExtensionElement</code>.
--- 71,79 ----
import java.util.ArrayList;
import java.util.Iterator;
! import javax.xml.soap.Name;
! import javax.xml.soap.SOAPElement;
! import javax.xml.soap.SOAPEnvelope;
! import javax.xml.soap.SOAPException;
! import javax.xml.soap.SOAPHeaderElement;
/**
* An implementation of <code>ExtensionElement</code>.
***************
*** 79,83 ****
* @version $Revision$
*/
-
class ExtensionElementImpl implements ExtensionElement {
--- 82,85 ----
Index: HeaderContainer.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/HeaderContainer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** HeaderContainer.java 10 Jun 2003 02:22:48 -0000 1.10
--- HeaderContainer.java 11 Dec 2003 06:41:29 -0000 1.11
***************
*** 72,77 ****
import java.util.ArrayList;
import java.util.Iterator;
! import javax.xml.soap.*;
!
/**
* An encapsulation of the Header Container of an <code>EbxmlMessage</code>.
--- 72,82 ----
import java.util.ArrayList;
import java.util.Iterator;
! import javax.xml.soap.Name;
! import javax.xml.soap.SOAPBody;
! import javax.xml.soap.SOAPElement;
! import javax.xml.soap.SOAPEnvelope;
! import javax.xml.soap.SOAPException;
! import javax.xml.soap.SOAPHeader;
! import javax.xml.soap.SOAPPart;
/**
* An encapsulation of the Header Container of an <code>EbxmlMessage</code>.
***************
*** 80,84 ****
* @version $Revision$
*/
-
class HeaderContainer {
--- 85,88 ----
Index: HeaderElement.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/HeaderElement.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** HeaderElement.java 17 Nov 2003 02:09:33 -0000 1.8
--- HeaderElement.java 11 Dec 2003 06:41:29 -0000 1.9
***************
*** 72,76 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An <code>ExtensionElement</code> in the SOAP Header of a
--- 72,75 ----
***************
*** 80,84 ****
* @version $Revision$
*/
-
class HeaderElement extends ExtensionElementImpl {
--- 79,82 ----
Index: Manifest.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Manifest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Manifest.java 10 Jun 2003 02:22:49 -0000 1.7
--- Manifest.java 11 Dec 2003 06:41:29 -0000 1.8
***************
*** 74,78 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An ebXML <code>Manifest</code> in the SOAP Body of a
--- 74,77 ----
***************
*** 82,86 ****
* @version $Revision$
*/
-
public class Manifest extends BodyElement {
--- 81,84 ----
Index: MessageHeader.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/MessageHeader.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** MessageHeader.java 9 Dec 2003 08:59:10 -0000 1.14
--- MessageHeader.java 11 Dec 2003 06:41:29 -0000 1.15
***************
*** 69,83 ****
package hk.hku.cecid.phoenix.message.packaging;
import java.util.ArrayList;
! import java.util.Iterator;
import java.util.Date;
import java.util.TimeZone;
- import java.util.Calendar;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
- import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
-
/**
* An ebXML <code>MessageHeader</code> in the SOAP Header of a
--- 69,82 ----
package hk.hku.cecid.phoenix.message.packaging;
+ import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import java.util.ArrayList;
! import java.util.Calendar;
import java.util.Date;
+ import java.util.Iterator;
import java.util.TimeZone;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
/**
* An ebXML <code>MessageHeader</code> in the SOAP Header of a
***************
*** 87,91 ****
* @version $Revision$
*/
-
public class MessageHeader extends HeaderElement {
--- 86,89 ----
Index: MessageOrder.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/MessageOrder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MessageOrder.java 9 Dec 2003 08:59:10 -0000 1.6
--- MessageOrder.java 11 Dec 2003 06:41:29 -0000 1.7
***************
*** 69,79 ****
package hk.hku.cecid.phoenix.message.packaging;
import java.util.Iterator;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
- import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
- import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
-
/**
* An ebXML <code>MessageOrder</code> in the SOAP Header of a
--- 69,78 ----
package hk.hku.cecid.phoenix.message.packaging;
+ import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
+ import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import java.util.Iterator;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
/**
* An ebXML <code>MessageOrder</code> in the SOAP Header of a
***************
*** 83,87 ****
* @version $Revision$
*/
-
public class MessageOrder extends HeaderElement {
--- 82,85 ----
Index: PKISignatureImpl.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/PKISignatureImpl.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** PKISignatureImpl.java 19 Sep 2003 06:54:45 -0000 1.11
--- PKISignatureImpl.java 11 Dec 2003 06:41:29 -0000 1.12
***************
*** 69,74 ****
package hk.hku.cecid.phoenix.message.packaging;
- import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
import hk.hku.cecid.phoenix.pki.ApacheXMLDSigner;
import hk.hku.cecid.phoenix.pki.CertResolver;
--- 69,76 ----
package hk.hku.cecid.phoenix.message.packaging;
import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
+ import hk.hku.cecid.phoenix.message.packaging.Signature;
+ import hk.hku.cecid.phoenix.message.packaging.SignatureException;
+ import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import hk.hku.cecid.phoenix.pki.ApacheXMLDSigner;
import hk.hku.cecid.phoenix.pki.CertResolver;
***************
*** 76,86 ****
import hk.hku.cecid.phoenix.pki.SignException;
import hk.hku.cecid.phoenix.pki.VerifyException;
! import java.io.*;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
import java.util.Iterator;
- import javax.xml.soap.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.TransformerFactory;
import org.apache.log4j.Logger;
--- 78,93 ----
import hk.hku.cecid.phoenix.pki.SignException;
import hk.hku.cecid.phoenix.pki.VerifyException;
! import java.io.ByteArrayInputStream;
! import java.io.ByteArrayOutputStream;
! import java.io.FileInputStream;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.X509Certificate;
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilderFactory;
+ import javax.xml.soap.SOAPElement;
+ import javax.xml.soap.SOAPEnvelope;
+ import javax.xml.soap.SOAPException;
+ import javax.xml.soap.SOAPPart;
import javax.xml.transform.TransformerFactory;
import org.apache.log4j.Logger;
***************
*** 92,96 ****
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.NodeList;
-
/**
* An implementation of ebXML <code>Signature</code>, making use
--- 99,102 ----
***************
*** 100,104 ****
* @version $Revision$
*/
-
class PKISignatureImpl extends Signature {
--- 106,109 ----
Index: PartialInputStream.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/PartialInputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PartialInputStream.java 9 Dec 2003 08:59:10 -0000 1.4
--- PartialInputStream.java 11 Dec 2003 06:41:30 -0000 1.5
***************
*** 68,74 ****
package hk.hku.cecid.phoenix.message.packaging;
import java.io.IOException;
-
import java.io.InputStream;
-
/**
* This is an implementation of <code>java.io.InputStream</code> that
--- 68,72 ----
***************
*** 78,82 ****
* @version $Revision$
*/
-
class PartialInputStream extends InputStream {
private final InputStream in;
--- 76,79 ----
Index: PayloadContainer.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/PayloadContainer.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** PayloadContainer.java 31 Jul 2003 06:55:59 -0000 1.11
--- PayloadContainer.java 11 Dec 2003 06:41:30 -0000 1.12
***************
*** 74,78 ****
import javax.activation.DataHandler;
import javax.activation.DataSource;
-
/**
* <P>An encapsulation of the payload container in an <code>EbxmlMessage</code>
--- 74,77 ----
***************
*** 101,105 ****
* @version $Revision$
*/
-
public class PayloadContainer {
--- 100,103 ----
Index: Reference.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Reference.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Reference.java 27 Jun 2003 01:45:30 -0000 1.10
--- Reference.java 11 Dec 2003 06:41:30 -0000 1.11
***************
*** 69,72 ****
--- 69,73 ----
package hk.hku.cecid.phoenix.message.packaging;
+ import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import java.util.ArrayList;
import java.util.Iterator;
***************
*** 75,80 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
- import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
-
/**
* A <code>Reference</code> inside a <code>Manifest</code>
--- 76,79 ----
***************
*** 83,87 ****
* @version $Revision$
*/
-
public class Reference extends ExtensionElementImpl {
--- 82,85 ----
Index: Signature.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Signature.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Signature.java 20 Aug 2003 08:02:09 -0000 1.9
--- Signature.java 11 Dec 2003 06:41:30 -0000 1.10
***************
*** 71,78 ****
import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import hk.hku.cecid.phoenix.pki.CertResolver;
- import javax.xml.soap.*;
import java.util.ArrayList;
import java.util.Iterator;
!
/**
* <P>An ebXML <code>Signature</code> is a <code>HeaderElement</code>
--- 71,79 ----
import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import hk.hku.cecid.phoenix.pki.CertResolver;
import java.util.ArrayList;
import java.util.Iterator;
! import javax.xml.soap.SOAPElement;
! import javax.xml.soap.SOAPEnvelope;
! import javax.xml.soap.SOAPException;
/**
* <P>An ebXML <code>Signature</code> is a <code>HeaderElement</code>
***************
*** 87,91 ****
* @version $Revision$
*/
-
public abstract class Signature extends HeaderElement {
--- 88,91 ----
Index: SignatureReference.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/SignatureReference.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SignatureReference.java 15 Apr 2003 02:05:44 -0000 1.2
--- SignatureReference.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 70,78 ****
import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
- import java.util.Iterator;
-
/**
* <ds:Reference> element in <ds:Signature>.
--- 70,77 ----
import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
+ import java.util.Iterator;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
/**
* <ds:Reference> element in <ds:Signature>.
***************
*** 81,85 ****
* @version $Revision$
*/
-
public class SignatureReference extends HeaderElement {
--- 80,83 ----
Index: StatusRequest.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/StatusRequest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** StatusRequest.java 9 Apr 2003 07:48:30 -0000 1.5
--- StatusRequest.java 11 Dec 2003 06:41:30 -0000 1.6
***************
*** 74,78 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An ebXML <code>StatusRequest</code> in the SOAP Body of a
--- 74,77 ----
***************
*** 82,86 ****
* @version $Revision$
*/
-
public class StatusRequest extends BodyElement {
--- 81,84 ----
Index: StatusResponse.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/StatusResponse.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** StatusResponse.java 9 Apr 2003 07:48:34 -0000 1.5
--- StatusResponse.java 11 Dec 2003 06:41:30 -0000 1.6
***************
*** 74,78 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An ebXML <code>StatusResponse</code> in the SOAP Body of a
--- 74,77 ----
***************
*** 82,86 ****
* @version $Revision$
*/
-
public class StatusResponse extends BodyElement {
--- 81,84 ----
Index: SyncReply.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/SyncReply.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SyncReply.java 18 Jun 2003 09:14:43 -0000 1.6
--- SyncReply.java 11 Dec 2003 06:41:30 -0000 1.7
***************
*** 72,76 ****
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
-
/**
* An ebXML <code>SyncReply</code> in the SOAP Header of a
--- 72,75 ----
***************
*** 80,84 ****
* @version $Revision$
*/
-
public class SyncReply extends HeaderElement {
--- 79,82 ----
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki
In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/pki
Modified Files:
AlwaysTrueHostnameVerifier.java ApacheXMLDSigner.java
CRLFileSource.java CRLSource.java CertPathVerifier.java
CertResolver.java CertSource.java CompositeKeyStore.java
DocumentDetail.java DocumentResolver.java
KeyStoreFileProp.java KeyStoreKeyManager.java
KeyStoreTrustManager.java SMIMEDecrypter.java
SMIMEEncrypter.java SMIMEHandler.java XMLDSigner.java
Log Message:
Remove all unused imports.
convert all wildcard imports to non-wildcard imports.
Index: AlwaysTrueHostnameVerifier.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/AlwaysTrueHostnameVerifier.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AlwaysTrueHostnameVerifier.java 22 Sep 2003 08:04:43 -0000 1.2
--- AlwaysTrueHostnameVerifier.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 68,73 ****
package hk.hku.cecid.phoenix.pki;
- //import javax.net.ssl.SSLSession;
- //import javax.net.ssl.HostnameVerifier;
import com.sun.net.ssl.HostnameVerifier;
import org.apache.log4j.Logger;
--- 68,71 ----
Index: ApacheXMLDSigner.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/ApacheXMLDSigner.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ApacheXMLDSigner.java 20 Aug 2003 08:02:10 -0000 1.11
--- ApacheXMLDSigner.java 11 Dec 2003 06:41:30 -0000 1.12
***************
*** 83,94 ****
import org.apache.xml.security.signature.XMLSignature;
import org.apache.xml.security.signature.XMLSignatureException;
- import org.apache.xml.security.transforms.Transforms;
import org.apache.xml.security.transforms.TransformationException;
import org.apache.xml.security.utils.Constants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
- import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
/**
* This class hides the details for digital signature. The digital signature
--- 83,92 ----
import org.apache.xml.security.signature.XMLSignature;
import org.apache.xml.security.signature.XMLSignatureException;
import org.apache.xml.security.transforms.TransformationException;
+ import org.apache.xml.security.transforms.Transforms;
import org.apache.xml.security.utils.Constants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
* This class hides the details for digital signature. The digital signature
Index: CRLFileSource.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/CRLFileSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CRLFileSource.java 9 Apr 2003 07:48:56 -0000 1.2
--- CRLFileSource.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 71,81 ****
import java.io.File;
import java.io.FileInputStream;
- import java.io.InputStream;
import java.io.IOException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
- import java.security.cert.CRLException;
import java.security.cert.X509CRL;
-
/**
* This class extends CRLSource to add initialization procedure for loading a
--- 71,80 ----
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+ import java.io.InputStream;
+ import java.security.cert.CRLException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
/**
* This class extends CRLSource to add initialization procedure for loading a
Index: CRLSource.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/CRLSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CRLSource.java 9 Apr 2003 07:48:56 -0000 1.2
--- CRLSource.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 74,82 ****
import java.security.PublicKey;
import java.security.SignatureException;
- import java.security.cert.Certificate;
import java.security.cert.CRLException;
import java.security.cert.X509CRL;
import java.util.Date;
-
/**
* This is an abstract class for holding a X509 CRL instance. The functionality
--- 74,81 ----
import java.security.PublicKey;
import java.security.SignatureException;
import java.security.cert.CRLException;
+ import java.security.cert.Certificate;
import java.security.cert.X509CRL;
import java.util.Date;
/**
* This is an abstract class for holding a X509 CRL instance. The functionality
Index: CertPathVerifier.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/CertPathVerifier.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CertPathVerifier.java 9 Apr 2003 07:48:58 -0000 1.4
--- CertPathVerifier.java 11 Dec 2003 06:41:30 -0000 1.5
***************
*** 69,79 ****
package hk.hku.cecid.phoenix.pki;
import java.io.IOException;
! import java.security.*;
! import java.security.cert.*;
import java.util.ArrayList;
import org.apache.log4j.Logger;
- import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
-
/**
* This class wraps the certificate path verification routine into a
--- 69,88 ----
package hk.hku.cecid.phoenix.pki;
+ import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
import java.io.IOException;
! import java.security.InvalidAlgorithmParameterException;
! import java.security.KeyStore;
! import java.security.KeyStoreException;
! import java.security.NoSuchAlgorithmException;
! import java.security.cert.CertPath;
! import java.security.cert.CertPathBuilder;
! import java.security.cert.CertPathBuilderException;
! import java.security.cert.CertStore;
! import java.security.cert.CollectionCertStoreParameters;
! import java.security.cert.PKIXBuilderParameters;
! import java.security.cert.X509CertSelector;
! import java.security.cert.X509Certificate;
import java.util.ArrayList;
import org.apache.log4j.Logger;
/**
* This class wraps the certificate path verification routine into a
Index: CertResolver.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/CertResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CertResolver.java 5 May 2003 08:41:27 -0000 1.2
--- CertResolver.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 70,74 ****
import java.security.cert.Certificate;
-
/**
*
--- 70,73 ----
***************
*** 76,80 ****
* @version $Revision$
*/
-
public interface CertResolver {
--- 75,78 ----
Index: CertSource.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/CertSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CertSource.java 9 Apr 2003 07:48:59 -0000 1.2
--- CertSource.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 71,77 ****
import java.io.File;
import java.io.FileInputStream;
- import java.io.InputStream;
import java.io.IOException;
! import java.util.Date;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
--- 71,76 ----
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
! import java.io.InputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
***************
*** 85,89 ****
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.X509Certificate;
!
/**
* This class loads a X509 certificate file. Basically this class only acts as
--- 84,88 ----
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.X509Certificate;
! import java.util.Date;
/**
* This class loads a X509 certificate file. Basically this class only acts as
Index: CompositeKeyStore.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/CompositeKeyStore.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CompositeKeyStore.java 4 Aug 2003 02:36:25 -0000 1.5
--- CompositeKeyStore.java 11 Dec 2003 06:41:30 -0000 1.6
***************
*** 69,76 ****
package hk.hku.cecid.phoenix.pki;
import java.io.File;
import java.io.FileInputStream;
- import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
--- 69,77 ----
package hk.hku.cecid.phoenix.pki;
+ import hk.hku.cecid.phoenix.common.util.Version;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
***************
*** 92,97 ****
import java.util.Hashtable;
import java.util.Vector;
- import hk.hku.cecid.phoenix.common.util.Version;
-
/**
* Composite keystore which manages keystores of different types. A typical
--- 93,96 ----
Index: DocumentDetail.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/DocumentDetail.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DocumentDetail.java 9 Apr 2003 07:49:00 -0000 1.2
--- DocumentDetail.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 70,74 ****
import java.io.InputStream;
-
/**
* A data structure class for holding the document attachment parameters.
--- 70,73 ----
Index: DocumentResolver.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/DocumentResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DocumentResolver.java 9 Apr 2003 07:49:01 -0000 1.2
--- DocumentResolver.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 71,79 ****
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
- import org.w3c.dom.Attr;
import org.apache.xml.security.signature.XMLSignatureInput;
import org.apache.xml.security.utils.resolver.ResourceResolverException;
import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
!
/**
* This class is needed by the Apache XML Security library for locating
--- 71,78 ----
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import org.apache.xml.security.signature.XMLSignatureInput;
import org.apache.xml.security.utils.resolver.ResourceResolverException;
import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
! import org.w3c.dom.Attr;
/**
* This class is needed by the Apache XML Security library for locating
Index: KeyStoreFileProp.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/KeyStoreFileProp.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** KeyStoreFileProp.java 9 Apr 2003 07:49:03 -0000 1.2
--- KeyStoreFileProp.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 70,74 ****
import java.io.Serializable;
-
/**
* This class represents the data structure for holding parameters for
--- 70,73 ----
Index: KeyStoreKeyManager.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/KeyStoreKeyManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** KeyStoreKeyManager.java 11 Sep 2003 08:58:09 -0000 1.1
--- KeyStoreKeyManager.java 11 Dec 2003 06:41:30 -0000 1.2
***************
*** 68,85 ****
package hk.hku.cecid.phoenix.pki;
! import java.io.IOException;
! import java.io.InputStream;
! import java.io.FileInputStream;
import java.io.File;
import java.net.Socket;
- import java.util.Enumeration;
- //import javax.net.ssl.X509KeyManager;
- import com.sun.net.ssl.X509KeyManager;
import java.security.KeyStore;
import java.security.KeyStoreException;
- import java.security.cert.Certificate;
- import java.security.cert.X509Certificate;
import java.security.Principal;
import java.security.PrivateKey;
import org.apache.log4j.Logger;
/**
--- 68,82 ----
package hk.hku.cecid.phoenix.pki;
! import com.sun.net.ssl.X509KeyManager;
import java.io.File;
+ import java.io.FileInputStream;
+ import java.io.InputStream;
import java.net.Socket;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.Principal;
import java.security.PrivateKey;
+ import java.security.cert.Certificate;
+ import java.security.cert.X509Certificate;
import org.apache.log4j.Logger;
/**
Index: KeyStoreTrustManager.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/KeyStoreTrustManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** KeyStoreTrustManager.java 10 Sep 2003 04:47:02 -0000 1.2
--- KeyStoreTrustManager.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 68,78 ****
package hk.hku.cecid.phoenix.pki;
- import java.util.Enumeration;
- //import javax.net.ssl.X509TrustManager;
import com.sun.net.ssl.X509TrustManager;
import java.security.KeyStore;
import java.security.KeyStoreException;
- import java.security.cert.X509Certificate;
import java.security.cert.CertificateException;
import org.apache.log4j.Logger;
/**
--- 68,77 ----
package hk.hku.cecid.phoenix.pki;
import com.sun.net.ssl.X509TrustManager;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.cert.CertificateException;
+ import java.security.cert.X509Certificate;
+ import java.util.Enumeration;
import org.apache.log4j.Logger;
/**
Index: SMIMEDecrypter.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/SMIMEDecrypter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SMIMEDecrypter.java 9 Apr 2003 07:49:03 -0000 1.3
--- SMIMEDecrypter.java 11 Dec 2003 06:41:30 -0000 1.4
***************
*** 69,86 ****
package hk.hku.cecid.phoenix.pki;
! import java.io.*;
! import java.security.*;
!
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
-
- import org.bouncycastle.mail.smime.parsers.SMIMEEncryptedParser;
import org.bouncycastle.cms.CMSException;
!
/**
A class for decrypting MimeBodyPart that was encrypted by SMIME.
*/
-
public class SMIMEDecrypter extends SMIMEHandler {
--- 69,86 ----
package hk.hku.cecid.phoenix.pki;
! import java.io.IOException;
! import java.security.GeneralSecurityException;
! import java.security.KeyStoreException;
! import java.security.NoSuchAlgorithmException;
! import java.security.PrivateKey;
! import java.security.UnrecoverableKeyException;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
import org.bouncycastle.cms.CMSException;
! import org.bouncycastle.mail.smime.parsers.SMIMEEncryptedParser;
/**
A class for decrypting MimeBodyPart that was encrypted by SMIME.
*/
public class SMIMEDecrypter extends SMIMEHandler {
Index: SMIMEEncrypter.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/SMIMEEncrypter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SMIMEEncrypter.java 9 Apr 2003 07:49:04 -0000 1.3
--- SMIMEEncrypter.java 11 Dec 2003 06:41:30 -0000 1.4
***************
*** 69,82 ****
package hk.hku.cecid.phoenix.pki;
! import java.io.*;
! import java.security.*;
! import java.security.cert.*;
!
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
-
import org.bouncycastle.jce.provider.JDKX509CertificateFactory;
import org.bouncycastle.mail.smime.generators.SMIMEEncryptedGenerator;
-
/**
A generator of SMIME encryption. It only works properly with BouncyCastle 's
--- 69,80 ----
package hk.hku.cecid.phoenix.pki;
! import java.io.ByteArrayInputStream;
! import java.security.KeyStoreException;
! import java.security.cert.CertificateEncodingException;
! import java.security.cert.CertificateException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
import org.bouncycastle.jce.provider.JDKX509CertificateFactory;
import org.bouncycastle.mail.smime.generators.SMIMEEncryptedGenerator;
/**
A generator of SMIME encryption. It only works properly with BouncyCastle 's
***************
*** 85,89 ****
by RSA.
*/
-
public class SMIMEEncrypter extends SMIMEHandler {
--- 83,86 ----
Index: SMIMEHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/SMIMEHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SMIMEHandler.java 20 May 2003 09:00:43 -0000 1.3
--- SMIMEHandler.java 11 Dec 2003 06:41:30 -0000 1.4
***************
*** 69,79 ****
package hk.hku.cecid.phoenix.pki;
! import java.security.*;
import javax.activation.CommandMap;
import javax.activation.MailcapCommandMap;
-
import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-
/**
It is the base class of SMIMEEncrypter and SMIMEDecrypter. The BouncyCastle 's
--- 69,76 ----
package hk.hku.cecid.phoenix.pki;
! import java.security.Security;
import javax.activation.CommandMap;
import javax.activation.MailcapCommandMap;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
/**
It is the base class of SMIMEEncrypter and SMIMEDecrypter. The BouncyCastle 's
Index: XMLDSigner.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/pki/XMLDSigner.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** XMLDSigner.java 9 Apr 2003 07:49:09 -0000 1.2
--- XMLDSigner.java 11 Dec 2003 06:41:30 -0000 1.3
***************
*** 72,76 ****
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-
/**
* This interface defines a standard way to have the document signed.
--- 72,75 ----
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
ApplicationContext.java ClientMessageListenerImpl.java
Command.java CommandConstants.java DbConnectionPool.java
DbTableManager.java DeliveryRecord.java DiagTool.java
DirectoryManager.java ErrorMessages.java Export.java
HttpSender.java IsolationLevelSelector.java MailSender.java
MessageListener.java MessageListenerImpl.java
MessageProcessor.java MessageSender.java MessageServer.java
MessageServiceHandler.java MessageServiceHandlerConfig.java
MessageServiceHandlerConnection.java
MessageServiceHandlerConnectionFactory.java Request.java
SignalMessageGenerator.java ToUrlResolver.java
ToUrlResolverImpl.java Transaction.java Utility.java
Log Message:
Remove all unused imports.
convert all wildcard imports to non-wildcard imports.
Index: ApplicationContext.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/ApplicationContext.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ApplicationContext.java 9 Apr 2003 07:47:30 -0000 1.6
--- ApplicationContext.java 11 Dec 2003 06:41:29 -0000 1.7
***************
*** 73,77 ****
import java.io.ObjectOutputStream;
import java.io.Serializable;
-
/**
* <code>ApplicationContext</code> is the identifier for a particular
--- 73,76 ----
***************
*** 81,85 ****
* @version $Revision$
*/
-
public class ApplicationContext implements Serializable {
--- 80,83 ----
Index: ClientMessageListenerImpl.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/ClientMessageListenerImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ClientMessageListenerImpl.java 16 Apr 2003 10:15:44 -0000 1.6
--- ClientMessageListenerImpl.java 11 Dec 2003 06:41:29 -0000 1.7
***************
*** 73,77 ****
import java.io.ObjectOutputStream;
import java.net.URL;
-
/**
* A class for the client side application to extend when the app
--- 73,76 ----
***************
*** 81,85 ****
* @version $Revision$
*/
-
public class ClientMessageListenerImpl extends MessageListenerImpl {
--- 80,83 ----
Index: Command.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Command.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Command.java 9 Apr 2003 07:47:32 -0000 1.21
--- Command.java 11 Dec 2003 06:41:29 -0000 1.22
***************
*** 70,78 ****
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import java.io.*;
import java.util.Iterator;
import javax.xml.soap.MimeHeader;
import javax.xml.soap.MimeHeaders;
-
/**
* A command object submitted to <code>MessageServiceHandler</code>.
--- 70,82 ----
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import java.io.File;
! import java.io.FileOutputStream;
! import java.io.IOException;
! import java.io.ObjectInputStream;
! import java.io.ObjectOutputStream;
! import java.io.Serializable;
import java.util.Iterator;
import javax.xml.soap.MimeHeader;
import javax.xml.soap.MimeHeaders;
/**
* A command object submitted to <code>MessageServiceHandler</code>.
***************
*** 82,86 ****
* @version $Revision$
*/
-
class Command implements Serializable {
--- 86,89 ----
Index: CommandConstants.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/CommandConstants.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CommandConstants.java 20 May 2003 09:00:39 -0000 1.9
--- CommandConstants.java 11 Dec 2003 06:41:29 -0000 1.10
***************
*** 71,75 ****
import java.util.Iterator;
import java.util.TreeMap;
-
/**
* This class defines the constant values used by identifying the type of
--- 71,74 ----
***************
*** 79,83 ****
* @version $Revision$
*/
-
class CommandConstants {
/*
--- 78,81 ----
Index: DbConnectionPool.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DbConnectionPool.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** DbConnectionPool.java 9 Apr 2003 07:47:36 -0000 1.26
--- DbConnectionPool.java 11 Dec 2003 06:41:29 -0000 1.27
***************
*** 74,78 ****
import java.sql.SQLException;
import org.apache.log4j.Logger;
-
/**
* Utility class for database connection pooling.
--- 74,77 ----
Index: DbTableManager.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DbTableManager.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** DbTableManager.java 12 May 2003 08:45:37 -0000 1.39
--- DbTableManager.java 11 Dec 2003 06:41:29 -0000 1.40
***************
*** 69,73 ****
package hk.hku.cecid.phoenix.message.handler;
! import java.io.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
--- 69,79 ----
package hk.hku.cecid.phoenix.message.handler;
! import java.io.ByteArrayOutputStream;
! import java.io.DataInputStream;
! import java.io.DataOutputStream;
! import java.io.File;
! import java.io.IOException;
! import java.io.InputStream;
! import java.io.OutputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
***************
*** 82,86 ****
import java.util.zip.ZipOutputStream;
import org.apache.log4j.Logger;
-
/**
* A class that manages the creation, verification and access of the data
--- 88,91 ----
Index: DeliveryRecord.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DeliveryRecord.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DeliveryRecord.java 28 May 2003 07:34:43 -0000 1.11
--- DeliveryRecord.java 11 Dec 2003 06:41:29 -0000 1.12
***************
*** 72,76 ****
import java.util.TreeSet;
import org.apache.log4j.Logger;
-
/**
* <p>Class used to store the delivery record of messages. It supports
--- 72,75 ----
Index: DiagTool.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DiagTool.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** DiagTool.java 9 Dec 2003 08:59:06 -0000 1.14
--- DiagTool.java 11 Dec 2003 06:41:29 -0000 1.15
***************
*** 70,79 ****
import hk.hku.cecid.phoenix.common.util.Property;
! import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
! import java.util.*;
!
/**
* Process the wildcard characters in the file names.
--- 70,87 ----
import hk.hku.cecid.phoenix.common.util.Property;
! import java.io.File;
! import java.io.FilenameFilter;
! import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
! import java.util.ArrayList;
! import java.util.Date;
! import java.util.HashMap;
! import java.util.HashSet;
! import java.util.Iterator;
! import java.util.Map;
! import java.util.Set;
! import java.util.StringTokenizer;
/**
* Process the wildcard characters in the file names.
Index: DirectoryManager.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DirectoryManager.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** DirectoryManager.java 20 May 2003 09:00:40 -0000 1.21
--- DirectoryManager.java 11 Dec 2003 06:41:29 -0000 1.22
***************
*** 71,75 ****
import hk.hku.cecid.phoenix.common.util.Property;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import java.io.*;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
--- 71,78 ----
import hk.hku.cecid.phoenix.common.util.Property;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import java.io.File;
! import java.io.FileNotFoundException;
! import java.io.FileOutputStream;
! import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
***************
*** 77,81 ****
import org.apache.log4j.Logger;
import sun.misc.BASE64Encoder;
-
/**
* This class manages the persistence of ebXML messages and the sending
--- 80,83 ----
***************
*** 88,92 ****
* @version $Revision$
*/
-
class DirectoryManager {
--- 90,93 ----
Index: ErrorMessages.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/ErrorMessages.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ErrorMessages.java 4 Aug 2003 02:29:00 -0000 1.19
--- ErrorMessages.java 11 Dec 2003 06:41:29 -0000 1.20
***************
*** 71,75 ****
import java.util.Iterator;
import java.util.TreeMap;
-
/**
* A class holding error codes and the corresponding error messages.
--- 71,74 ----
***************
*** 78,82 ****
* @version $Revision$
*/
-
public class ErrorMessages {
--- 77,80 ----
Index: Export.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Export.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** Export.java 20 May 2003 08:54:44 -0000 1.25
--- Export.java 11 Dec 2003 06:41:29 -0000 1.26
***************
*** 69,83 ****
package hk.hku.cecid.phoenix.message.handler;
! import java.io.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
! import java.util.*;
import org.apache.log4j.Logger;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
-
-
/**
* Export specified data items from database to files.
--- 69,92 ----
package hk.hku.cecid.phoenix.message.handler;
! import java.io.File;
! import java.io.FileInputStream;
! import java.io.FileOutputStream;
! import java.io.FilenameFilter;
! import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
! import java.util.Date;
! import java.util.HashMap;
! import java.util.HashSet;
! import java.util.Iterator;
! import java.util.Map;
! import java.util.Set;
! import java.util.StringTokenizer;
! import java.util.TreeSet;
import org.apache.log4j.Logger;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
/**
* Export specified data items from database to files.
Index: HttpSender.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/HttpSender.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** HttpSender.java 17 Jun 2003 04:22:16 -0000 1.15
--- HttpSender.java 11 Dec 2003 06:41:29 -0000 1.16
***************
*** 72,76 ****
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.transport.Http;
- // import hk.hku.cecid.phoenix.message.transport.HttpServlet;
import hk.hku.cecid.phoenix.message.transport.TransportException;
import java.net.URL;
--- 72,75 ----
***************
*** 85,89 ****
* @version $Revision$
*/
-
class HttpSender extends MessageSender {
--- 84,87 ----
Index: IsolationLevelSelector.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/IsolationLevelSelector.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** IsolationLevelSelector.java 9 Apr 2003 07:47:47 -0000 1.2
--- IsolationLevelSelector.java 11 Dec 2003 06:41:29 -0000 1.3
***************
*** 55,59 ****
import java.sql.Connection;
import java.util.HashMap;
-
/**
*The three preventable phenomena are:
--- 55,58 ----
Index: MailSender.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MailSender.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** MailSender.java 21 May 2003 14:07:12 -0000 1.12
--- MailSender.java 11 Dec 2003 06:41:29 -0000 1.13
***************
*** 82,86 ****
* @version $Revision$
*/
-
class MailSender extends MessageSender {
--- 82,85 ----
Index: MessageListener.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageListener.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MessageListener.java 9 Apr 2003 07:47:51 -0000 1.4
--- MessageListener.java 11 Dec 2003 06:41:29 -0000 1.5
***************
*** 72,76 ****
import java.io.Serializable;
import java.net.URL;
-
/**
* An object reference of a class implementing <code>MessageListener</code>
--- 72,75 ----
***************
*** 82,86 ****
* @version $Revision$
*/
-
public interface MessageListener extends Serializable {
--- 81,84 ----
Index: MessageListenerImpl.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageListenerImpl.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** MessageListenerImpl.java 16 Apr 2003 10:15:44 -0000 1.18
--- MessageListenerImpl.java 11 Dec 2003 06:41:29 -0000 1.19
***************
*** 69,73 ****
package hk.hku.cecid.phoenix.message.handler;
- import org.apache.log4j.Logger;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import java.io.File;
--- 69,72 ----
***************
*** 77,81 ****
import java.io.ObjectOutputStream;
import java.net.URL;
!
/**
* An implementation of <code>MessageListener</code> interface.
--- 76,80 ----
import java.io.ObjectOutputStream;
import java.net.URL;
! import org.apache.log4j.Logger;
/**
* An implementation of <code>MessageListener</code> interface.
***************
*** 84,88 ****
* @version $Revision$
*/
-
public class MessageListenerImpl implements MessageListener {
--- 83,86 ----
Index: MessageProcessor.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageProcessor.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** MessageProcessor.java 21 Nov 2003 02:00:05 -0000 1.52
--- MessageProcessor.java 11 Dec 2003 06:41:29 -0000 1.53
***************
*** 75,79 ****
import hk.hku.cecid.phoenix.message.packaging.ErrorList;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
! import java.io.*;
import java.net.URL;
import java.util.Date;
--- 75,82 ----
import hk.hku.cecid.phoenix.message.packaging.ErrorList;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
! import java.io.ByteArrayInputStream;
! import java.io.ByteArrayOutputStream;
! import java.io.InputStreamReader;
! import java.io.LineNumberReader;
import java.net.URL;
import java.util.Date;
***************
*** 93,97 ****
* @version $Revision$
*/
-
class MessageProcessor extends Thread {
--- 96,99 ----
Index: MessageSender.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageSender.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MessageSender.java 9 Apr 2003 07:47:52 -0000 1.8
--- MessageSender.java 11 Dec 2003 06:41:29 -0000 1.9
***************
*** 72,76 ****
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import java.net.URL;
-
/**
* <code>MessageSender</code> sends an <code>EbxmlMessage</code> to the
--- 72,75 ----
***************
*** 81,85 ****
* @version $Revision$
*/
-
abstract class MessageSender extends Thread {
--- 80,83 ----
Index: MessageServer.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServer.java,v
retrieving revision 1.142
retrieving revision 1.143
diff -C2 -d -r1.142 -r1.143
*** MessageServer.java 9 Dec 2003 08:59:07 -0000 1.142
--- MessageServer.java 11 Dec 2003 06:41:29 -0000 1.143
***************
*** 68,71 ****
--- 68,79 ----
package hk.hku.cecid.phoenix.message.handler;
+ import hk.hku.cecid.phoenix.common.util.Property;
+ import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
+ import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
+ import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
+ import hk.hku.cecid.phoenix.message.packaging.ErrorList;
+ import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
+ import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
+ import hk.hku.cecid.phoenix.message.packaging.PayloadContainer;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
***************
*** 93,97 ****
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
-
import javax.activation.DataHandler;
import javax.activation.DataSource;
--- 101,104 ----
***************
*** 101,114 ****
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-
- import hk.hku.cecid.phoenix.common.util.Property;
- import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
- import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
- import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
- import hk.hku.cecid.phoenix.message.packaging.ErrorList;
- import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
- import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
- import hk.hku.cecid.phoenix.message.packaging.PayloadContainer;
-
import org.apache.log4j.Logger;
--- 108,111 ----
***************
*** 123,127 ****
* @version $Revision$
*/
-
public class MessageServer {
--- 120,123 ----
Index: MessageServiceHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v
retrieving revision 1.179
retrieving revision 1.180
diff -C2 -d -r1.179 -r1.180
*** MessageServiceHandler.java 9 Dec 2003 08:59:07 -0000 1.179
--- MessageServiceHandler.java 11 Dec 2003 06:41:29 -0000 1.180
***************
*** 71,102 ****
import hk.hku.cecid.phoenix.common.util.AuthenticationManager;
import hk.hku.cecid.phoenix.common.util.Property;
! import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
import hk.hku.cecid.phoenix.message.packaging.AckRequested;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessageFactory;
import hk.hku.cecid.phoenix.message.packaging.ErrorList;
- import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
import hk.hku.cecid.phoenix.message.packaging.Signature;
import hk.hku.cecid.phoenix.message.packaging.SignatureException;
- import hk.hku.cecid.phoenix.message.packaging.SignatureReference;
import hk.hku.cecid.phoenix.message.packaging.StatusRequest;
import hk.hku.cecid.phoenix.message.packaging.StatusResponse;
! import hk.hku.cecid.phoenix.message.packaging.validation.*;
import hk.hku.cecid.phoenix.message.transport.Mail;
import hk.hku.cecid.phoenix.message.transport.TransportException;
import hk.hku.cecid.phoenix.pki.CertResolver;
! import java.io.*;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
! import java.util.*;
! import javax.servlet.http.HttpServlet;
! import javax.servlet.http.HttpServletRequest;
! import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.xml.messaging.JAXMException;
import javax.xml.messaging.ProviderMetaData;
--- 71,123 ----
import hk.hku.cecid.phoenix.common.util.AuthenticationManager;
import hk.hku.cecid.phoenix.common.util.Property;
! import hk.hku.cecid.phoenix.message.handler.InitializationException;
import hk.hku.cecid.phoenix.message.packaging.AckRequested;
+ import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessageFactory;
import hk.hku.cecid.phoenix.message.packaging.ErrorList;
import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
import hk.hku.cecid.phoenix.message.packaging.Signature;
import hk.hku.cecid.phoenix.message.packaging.SignatureException;
import hk.hku.cecid.phoenix.message.packaging.StatusRequest;
import hk.hku.cecid.phoenix.message.packaging.StatusResponse;
! import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlMessageValidator;
! import hk.hku.cecid.phoenix.message.packaging.validation.EbxmlValidationException;
! import hk.hku.cecid.phoenix.message.packaging.validation.SOAPValidationException;
import hk.hku.cecid.phoenix.message.transport.Mail;
import hk.hku.cecid.phoenix.message.transport.TransportException;
import hk.hku.cecid.phoenix.pki.CertResolver;
! import java.io.ByteArrayInputStream;
! import java.io.File;
! import java.io.FileInputStream;
! import java.io.FileOutputStream;
! import java.io.IOException;
! import java.io.InputStream;
! import java.io.ObjectInputStream;
! import java.io.ObjectOutputStream;
! import java.io.OutputStream;
! import java.io.PrintWriter;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
! import java.util.ArrayList;
! import java.util.Date;
! import java.util.Enumeration;
! import java.util.HashMap;
! import java.util.HashSet;
! import java.util.Hashtable;
! import java.util.Iterator;
! import java.util.Map;
! import java.util.Properties;
! import java.util.Set;
! import java.util.Stack;
! import java.util.StringTokenizer;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
+ import javax.servlet.http.HttpServlet;
+ import javax.servlet.http.HttpServletRequest;
+ import javax.servlet.http.HttpServletResponse;
import javax.xml.messaging.JAXMException;
import javax.xml.messaging.ProviderMetaData;
***************
*** 116,123 ****
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
- import javax.xml.transform.dom.DOMSource;
- import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
--- 137,144 ----
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
+ import javax.xml.transform.dom.DOMSource;
+ import javax.xml.transform.stream.StreamResult;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
***************
*** 131,135 ****
* @version $Revision$
*/
-
public class MessageServiceHandler extends HttpServlet
implements ReqRespListener {
--- 152,155 ----
Index: MessageServiceHandlerConfig.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandlerConfig.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** MessageServiceHandlerConfig.java 27 May 2003 06:53:31 -0000 1.15
--- MessageServiceHandlerConfig.java 11 Dec 2003 06:41:29 -0000 1.16
***************
*** 74,78 ****
import java.io.Serializable;
import java.net.URL;
-
/**
* Configurations such as transport layer, reliable messaging characteristics,
--- 74,77 ----
***************
*** 83,87 ****
* @version $Revision$
*/
-
public class MessageServiceHandlerConfig implements Serializable {
--- 82,85 ----
Index: MessageServiceHandlerConnection.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandlerConnection.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** MessageServiceHandlerConnection.java 9 Apr 2003 07:48:00 -0000 1.24
--- MessageServiceHandlerConnection.java 11 Dec 2003 06:41:29 -0000 1.25
***************
*** 87,91 ****
* @version $Revision$
*/
-
public class MessageServiceHandlerConnection implements ProviderConnection {
--- 87,90 ----
Index: MessageServiceHandlerConnectionFactory.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandlerConnectionFactory.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MessageServiceHandlerConnectionFactory.java 9 Apr 2003 07:48:01 -0000 1.9
--- MessageServiceHandlerConnectionFactory.java 11 Dec 2003 06:41:29 -0000 1.10
***************
*** 73,77 ****
import javax.xml.messaging.ProviderConnectionFactory;
import org.apache.log4j.Logger;
-
/**
* Implementation of <code>javax.xml.messaging.ProviderConnectionFactory</code>
--- 73,76 ----
***************
*** 80,84 ****
* @version $Revision$
*/
-
public class MessageServiceHandlerConnectionFactory
extends ProviderConnectionFactory {
--- 79,82 ----
Index: Request.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Request.java,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** Request.java 9 Dec 2003 08:59:08 -0000 1.75
--- Request.java 11 Dec 2003 06:41:29 -0000 1.76
***************
*** 68,71 ****
--- 68,76 ----
package hk.hku.cecid.phoenix.message.handler;
+ import hk.hku.cecid.phoenix.common.util.Property;
+ import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
+ import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
+ import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
+ import hk.hku.cecid.phoenix.message.packaging.PayloadContainer;
import java.io.ByteArrayOutputStream;
import java.io.File;
***************
*** 86,90 ****
import java.util.StringTokenizer;
import java.util.TreeMap;
-
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
--- 91,94 ----
***************
*** 98,108 ****
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-
- import hk.hku.cecid.phoenix.common.util.Property;
- import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
- import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
- import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
- import hk.hku.cecid.phoenix.message.packaging.PayloadContainer;
-
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
--- 102,105 ----
***************
*** 111,115 ****
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
-
/**
* <code>Request</code> is an API of which an Application makes use to
--- 108,111 ----
***************
*** 119,123 ****
* @version $Revision$
*/
-
public class Request {
--- 115,118 ----
Index: SignalMessageGenerator.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/SignalMessageGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SignalMessageGenerator.java 9 Dec 2003 08:59:09 -0000 1.2
--- SignalMessageGenerator.java 11 Dec 2003 06:41:29 -0000 1.3
***************
*** 67,79 ****
*/
package hk.hku.cecid.phoenix.message.handler;
- import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
! import hk.hku.cecid.phoenix.message.packaging.ErrorList;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.Signature;
import hk.hku.cecid.phoenix.message.packaging.SignatureReference;
- import javax.xml.soap.SOAPException;
import java.util.Date;
import java.util.Iterator;
/**
* <code>SignalMessageGenerator</code> is an utility api for the user to
--- 67,78 ----
*/
package hk.hku.cecid.phoenix.message.handler;
import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.Signature;
import hk.hku.cecid.phoenix.message.packaging.SignatureReference;
import java.util.Date;
import java.util.Iterator;
+ import javax.xml.soap.SOAPException;
/**
* <code>SignalMessageGenerator</code> is an utility api for the user to
Index: ToUrlResolver.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/ToUrlResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ToUrlResolver.java 23 Apr 2003 14:28:06 -0000 1.2
--- ToUrlResolver.java 11 Dec 2003 06:41:29 -0000 1.3
***************
*** 71,75 ****
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import java.net.URL;
-
/**
*
--- 71,74 ----
***************
*** 77,81 ****
* @version $Revision$
*/
-
public interface ToUrlResolver {
--- 76,79 ----
Index: ToUrlResolverImpl.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/ToUrlResolverImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ToUrlResolverImpl.java 23 Apr 2003 14:28:06 -0000 1.1
--- ToUrlResolverImpl.java 11 Dec 2003 06:41:29 -0000 1.2
***************
*** 72,76 ****
import java.net.URL;
import java.util.Iterator;
-
/**
*
--- 72,75 ----
***************
*** 78,82 ****
* @version $Revision$
*/
-
public class ToUrlResolverImpl implements ToUrlResolver {
--- 77,80 ----
Index: Transaction.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Transaction.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Transaction.java 27 May 2003 06:49:40 -0000 1.15
--- Transaction.java 11 Dec 2003 06:41:29 -0000 1.16
***************
*** 69,78 ****
package hk.hku.cecid.phoenix.message.handler;
! import hk.hku.cecid.phoenix.message.packaging.*;
! import java.io.*;
! import java.sql.*;
! import java.util.*;
import org.apache.log4j.Logger;
-
/**
* Transaction class representing a group of operations as an atomic unit.
--- 69,86 ----
package hk.hku.cecid.phoenix.message.handler;
! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import java.io.File;
! import java.io.FileInputStream;
! import java.io.FileOutputStream;
! import java.io.IOException;
! import java.io.ObjectInputStream;
! import java.io.ObjectOutputStream;
! import java.sql.Connection;
! import java.sql.PreparedStatement;
! import java.sql.SQLException;
! import java.util.ArrayList;
! import java.util.HashMap;
! import java.util.Iterator;
import org.apache.log4j.Logger;
/**
* Transaction class representing a group of operations as an atomic unit.
Index: Utility.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Utility.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Utility.java 6 Jun 2003 07:17:30 -0000 1.22
--- Utility.java 11 Dec 2003 06:41:29 -0000 1.23
***************
*** 70,74 ****
import hk.hku.cecid.phoenix.common.util.Property;
- import hk.hku.cecid.phoenix.message.handler.InitializationException;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
--- 70,73 ----
***************
*** 97,101 ****
* @version $Revision$
*/
-
public class Utility {
--- 96,99 ----
|
|
From: <bob...@us...> - 2003-12-11 06:41:33
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport
In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/message/transport
Modified Files:
Http.java HttpServlet.java Mail.java
Log Message:
Remove all unused imports.
convert all wildcard imports to non-wildcard imports.
Index: Http.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Http.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Http.java 17 Nov 2003 02:09:33 -0000 1.10
--- Http.java 11 Dec 2003 06:41:30 -0000 1.11
***************
*** 69,115 ****
package hk.hku.cecid.phoenix.message.transport;
import hk.hku.cecid.phoenix.common.util.Property;
import hk.hku.cecid.phoenix.message.handler.Constants;
import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
import hk.hku.cecid.phoenix.message.handler.InitializationException;
- // import hk.hku.cecid.phoenix.message.handler.Utility;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
- import hk.hku.cecid.phoenix.pki.KeyStoreTrustManager;
import hk.hku.cecid.phoenix.pki.KeyStoreKeyManager;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
- import java.io.FileInputStream;
- import java.io.File;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
- import java.net.MalformedURLException;
- import java.security.Provider;
- import java.security.Security;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.util.Iterator;
import java.util.Map;
- import java.util.HashMap;
- // import java.util.Map.Entry;
import java.util.StringTokenizer;
- /*
- import javax.net.ssl.KeyManager;
- import javax.net.ssl.SSLContext;
- import javax.net.ssl.TrustManager;
- import javax.net.ssl.HostnameVerifier;
- import javax.net.ssl.HttpsURLConnection;
- */
- import com.sun.net.ssl.KeyManager;
- import com.sun.net.ssl.SSLContext;
- import com.sun.net.ssl.TrustManager;
- import com.sun.net.ssl.HostnameVerifier;
- import com.sun.net.ssl.HttpsURLConnection;
-
import javax.net.ssl.SSLSocketFactory;
import javax.xml.soap.MessageFactory;
- // import javax.xml.soap.MimeHeader;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
--- 69,101 ----
package hk.hku.cecid.phoenix.message.transport;
+ import com.sun.net.ssl.HostnameVerifier;
+ import com.sun.net.ssl.HttpsURLConnection;
+ import com.sun.net.ssl.KeyManager;
+ import com.sun.net.ssl.SSLContext;
+ import com.sun.net.ssl.TrustManager;
import hk.hku.cecid.phoenix.common.util.Property;
import hk.hku.cecid.phoenix.message.handler.Constants;
import hk.hku.cecid.phoenix.message.handler.ErrorMessages;
import hk.hku.cecid.phoenix.message.handler.InitializationException;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.pki.KeyStoreKeyManager;
+ import hk.hku.cecid.phoenix.pki.KeyStoreTrustManager;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+ import java.io.File;
+ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.KeyStore;
import java.security.KeyStoreException;
+ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
import javax.net.ssl.SSLSocketFactory;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPException;
***************
*** 124,128 ****
* @version $Revision$
*/
-
public final class Http {
--- 110,113 ----
Index: HttpServlet.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/HttpServlet.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** HttpServlet.java 9 Apr 2003 07:48:49 -0000 1.19
--- HttpServlet.java 11 Dec 2003 06:41:30 -0000 1.20
***************
*** 93,97 ****
* @version $Revision$
*/
-
public abstract class HttpServlet extends JAXMServlet
implements ReqRespListener {
--- 93,96 ----
Index: Mail.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Mail.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** Mail.java 4 Nov 2003 07:00:28 -0000 1.41
--- Mail.java 11 Dec 2003 06:41:30 -0000 1.42
***************
*** 74,78 ****
import hk.hku.cecid.phoenix.message.handler.InitializationException;
import hk.hku.cecid.phoenix.message.handler.Utility;
! import hk.hku.cecid.phoenix.message.packaging.*;
import hk.hku.cecid.phoenix.pki.SMIMEDecrypter;
import hk.hku.cecid.phoenix.pki.SMIMEEncrypter;
--- 74,80 ----
import hk.hku.cecid.phoenix.message.handler.InitializationException;
import hk.hku.cecid.phoenix.message.handler.Utility;
! import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.pki.SMIMEDecrypter;
import hk.hku.cecid.phoenix.pki.SMIMEEncrypter;
***************
*** 82,88 ****
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
- import java.io.IOException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
--- 84,90 ----
import java.io.ByteArrayOutputStream;
import java.io.File;
+ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
***************
*** 92,97 ****
import java.util.Properties;
import javax.activation.DataHandler;
! import javax.mail.*;
! import javax.mail.internet.*;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
--- 94,110 ----
import java.util.Properties;
import javax.activation.DataHandler;
! import javax.mail.Authenticator;
! import javax.mail.Flags;
! import javax.mail.Folder;
! import javax.mail.Message;
! import javax.mail.MessagingException;
! import javax.mail.NoSuchProviderException;
! import javax.mail.PasswordAuthentication;
! import javax.mail.Session;
! import javax.mail.Store;
! import javax.mail.Transport;
! import javax.mail.internet.InternetAddress;
! import javax.mail.internet.MimeMessage;
! import javax.mail.internet.MimeMultipart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.MimeHeaders;
***************
*** 106,110 ****
* @version $Revision$
*/
-
public final class Mail {
--- 119,122 ----
|
|
From: <bob...@us...> - 2003-12-11 06:41:33
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/message/packaging/validation Modified Files: BodyValidator.java EbxmlMessageValidator.java EbxmlValidationException.java HeaderValidator.java SOAPValidationException.java ValidationException.java Log Message: Remove all unused imports. convert all wildcard imports to non-wildcard imports. Index: BodyValidator.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation/BodyValidator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BodyValidator.java 9 Apr 2003 07:48:37 -0000 1.2 --- BodyValidator.java 11 Dec 2003 06:41:30 -0000 1.3 *************** *** 68,73 **** package hk.hku.cecid.phoenix.message.packaging.validation; ! import hk.hku.cecid.phoenix.message.packaging.*; ! /** * Class for validating the body of an ebXML message. --- 68,72 ---- package hk.hku.cecid.phoenix.message.packaging.validation; ! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage; /** * Class for validating the body of an ebXML message. Index: EbxmlMessageValidator.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation/EbxmlMessageValidator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EbxmlMessageValidator.java 9 Apr 2003 07:48:38 -0000 1.2 --- EbxmlMessageValidator.java 11 Dec 2003 06:41:30 -0000 1.3 *************** *** 68,73 **** package hk.hku.cecid.phoenix.message.packaging.validation; ! import hk.hku.cecid.phoenix.message.packaging.*; ! /** * Class for validating an ebXML message. --- 68,72 ---- package hk.hku.cecid.phoenix.message.packaging.validation; ! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage; /** * Class for validating an ebXML message. Index: EbxmlValidationException.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation/EbxmlValidationException.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** EbxmlValidationException.java 29 Apr 2003 08:54:05 -0000 1.11 --- EbxmlValidationException.java 11 Dec 2003 06:41:30 -0000 1.12 *************** *** 73,78 **** import hk.hku.cecid.phoenix.message.packaging.MessageHeader; import java.util.Date; ! import javax.xml.soap.*; ! /** * Exception class that can generate ebXML error messages from the information --- 73,78 ---- import hk.hku.cecid.phoenix.message.packaging.MessageHeader; import java.util.Date; ! import javax.xml.soap.SOAPException; ! import javax.xml.soap.SOAPMessage; /** * Exception class that can generate ebXML error messages from the information Index: HeaderValidator.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation/HeaderValidator.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** HeaderValidator.java 9 Apr 2003 07:48:40 -0000 1.5 --- HeaderValidator.java 11 Dec 2003 06:41:30 -0000 1.6 *************** *** 68,75 **** package hk.hku.cecid.phoenix.message.packaging.validation; ! import hk.hku.cecid.phoenix.message.packaging.*; ! import java.util.*; import org.apache.xml.utils.URI; - /** * Class for validating the header of an ebXML message. --- 68,78 ---- package hk.hku.cecid.phoenix.message.packaging.validation; ! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage; ! import hk.hku.cecid.phoenix.message.packaging.MessageHeader; ! import hk.hku.cecid.phoenix.message.packaging.PayloadContainer; ! import java.util.HashSet; ! import java.util.Iterator; ! import java.util.Set; import org.apache.xml.utils.URI; /** * Class for validating the header of an ebXML message. Index: SOAPValidationException.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation/SOAPValidationException.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SOAPValidationException.java 9 Apr 2003 07:48:48 -0000 1.6 --- SOAPValidationException.java 11 Dec 2003 06:41:30 -0000 1.7 *************** *** 68,73 **** package hk.hku.cecid.phoenix.message.packaging.validation; ! import javax.xml.soap.*; ! /** * Exception class that can generate SOAP fault messages from the information it --- 68,81 ---- package hk.hku.cecid.phoenix.message.packaging.validation; ! import javax.xml.soap.Detail; ! import javax.xml.soap.DetailEntry; ! import javax.xml.soap.MessageFactory; ! import javax.xml.soap.Name; ! import javax.xml.soap.SOAPBody; ! import javax.xml.soap.SOAPEnvelope; ! import javax.xml.soap.SOAPException; ! import javax.xml.soap.SOAPFault; ! import javax.xml.soap.SOAPMessage; ! import javax.xml.soap.SOAPPart; /** * Exception class that can generate SOAP fault messages from the information it Index: ValidationException.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/validation/ValidationException.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ValidationException.java 9 Apr 2003 07:48:49 -0000 1.5 --- ValidationException.java 11 Dec 2003 06:41:30 -0000 1.6 *************** *** 68,73 **** package hk.hku.cecid.phoenix.message.packaging.validation; ! import javax.xml.soap.*; ! /** * Base class for message validation exceptions. All classes extending this --- 68,73 ---- package hk.hku.cecid.phoenix.message.packaging.validation; ! import javax.xml.soap.SOAPException; ! import javax.xml.soap.SOAPMessage; /** * Base class for message validation exceptions. All classes extending this |
|
From: <bob...@us...> - 2003-12-11 06:41:33
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor
In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/message/monitor
Modified Files:
BasicWindowHandler.java ConfigDialog.java ControlPanel.java
DiagnosticPanel.java HistoryPanel.java ImagePanel.java
LogPanel.java MessageBox.java MessageFrame.java Monitor.java
SendPanel.java TabChangeListener.java
Log Message:
Remove all unused imports.
convert all wildcard imports to non-wildcard imports.
Index: BasicWindowHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/BasicWindowHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** BasicWindowHandler.java 9 Apr 2003 07:48:08 -0000 1.5
--- BasicWindowHandler.java 11 Dec 2003 06:41:29 -0000 1.6
***************
*** 71,75 ****
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
-
/**
* Simple extension to the <code>WindowAdapter</code> class for closing the
--- 71,74 ----
***************
*** 79,83 ****
* @version $Revision$
*/
-
public class BasicWindowHandler extends WindowAdapter {
/**
--- 78,81 ----
Index: ConfigDialog.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/ConfigDialog.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** ConfigDialog.java 9 Dec 2003 08:59:09 -0000 1.15
--- ConfigDialog.java 11 Dec 2003 06:41:29 -0000 1.16
***************
*** 69,72 ****
--- 69,73 ----
package hk.hku.cecid.phoenix.message.monitor;
+ import hk.hku.cecid.phoenix.common.util.Property;
import java.awt.Color;
import java.awt.GridBagConstraints;
***************
*** 78,82 ****
import java.awt.event.WindowEvent;
import java.io.IOException;
- import javax.swing.border.TitledBorder;
import javax.swing.JButton;
import javax.swing.JCheckBox;
--- 79,82 ----
***************
*** 85,90 ****
import javax.swing.JPanel;
import javax.swing.JTextField;
! import hk.hku.cecid.phoenix.common.util.Property;
!
/**
* A dialog for collecting initialization configuration
--- 85,89 ----
import javax.swing.JPanel;
import javax.swing.JTextField;
! import javax.swing.border.TitledBorder;
/**
* A dialog for collecting initialization configuration
***************
*** 93,97 ****
* @version $Revision$
*/
-
public class ConfigDialog extends JDialog {
--- 92,95 ----
Index: ControlPanel.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/ControlPanel.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ControlPanel.java 9 Apr 2003 07:48:10 -0000 1.7
--- ControlPanel.java 11 Dec 2003 06:41:29 -0000 1.8
***************
*** 69,72 ****
--- 69,74 ----
package hk.hku.cecid.phoenix.message.monitor;
+ import hk.hku.cecid.phoenix.message.handler.Request;
+ import hk.hku.cecid.phoenix.message.handler.RequestException;
import java.awt.Color;
import java.awt.Dimension;
***************
*** 81,87 ****
import javax.swing.JRadioButton;
import javax.swing.border.TitledBorder;
- import hk.hku.cecid.phoenix.message.handler.Request;
- import hk.hku.cecid.phoenix.message.handler.RequestException;
-
/**
* A panel for controlling/monitoring the MSH
--- 83,86 ----
***************
*** 90,94 ****
* @version $Revision$
*/
-
public class ControlPanel extends JPanel {
--- 89,92 ----
Index: DiagnosticPanel.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/DiagnosticPanel.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** DiagnosticPanel.java 9 Apr 2003 07:48:11 -0000 1.17
--- DiagnosticPanel.java 11 Dec 2003 06:41:29 -0000 1.18
***************
*** 69,72 ****
--- 69,76 ----
package hk.hku.cecid.phoenix.message.monitor;
+ import hk.hku.cecid.phoenix.message.handler.ApplicationContext;
+ import hk.hku.cecid.phoenix.message.handler.Request;
+ import hk.hku.cecid.phoenix.message.handler.RequestException;
+ import hk.hku.cecid.phoenix.message.handler.Utility;
import java.awt.Color;
import java.awt.Dimension;
***************
*** 76,95 ****
import java.awt.event.ActionListener;
import java.util.Date;
- import javax.swing.border.TitledBorder;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
! import javax.swing.JOptionPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
- import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
! import hk.hku.cecid.phoenix.message.handler.ApplicationContext;
! import hk.hku.cecid.phoenix.message.handler.Utility;
! import hk.hku.cecid.phoenix.message.handler.Request;
! import hk.hku.cecid.phoenix.message.handler.RequestException;
!
/**
* A panel for diagnosing MSH
--- 80,94 ----
import java.awt.event.ActionListener;
import java.util.Date;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JLabel;
+ import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
! import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
! import javax.swing.border.TitledBorder;
/**
* A panel for diagnosing MSH
***************
*** 98,102 ****
* @version $Revision$
*/
-
public class DiagnosticPanel extends JPanel {
--- 97,100 ----
Index: HistoryPanel.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/HistoryPanel.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** HistoryPanel.java 9 Apr 2003 07:48:11 -0000 1.7
--- HistoryPanel.java 11 Dec 2003 06:41:29 -0000 1.8
***************
*** 73,81 ****
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
- import java.awt.Point;
import java.io.StringReader;
import java.text.SimpleDateFormat;
--- 73,81 ----
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import java.awt.BorderLayout;
+ import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.StringReader;
import java.text.SimpleDateFormat;
***************
*** 93,103 ****
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
- import javax.xml.transform.sax.SAXResult;
- import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.DefaultHandler;
-
/**
* A panel for showing sent and recevied messages
--- 93,102 ----
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
+ import javax.xml.transform.sax.SAXResult;
+ import javax.xml.transform.stream.StreamSource;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.DefaultHandler;
/**
* A panel for showing sent and recevied messages
***************
*** 106,110 ****
* @version $Revision$
*/
-
public class HistoryPanel extends JPanel {
/** Logging panel */
--- 105,108 ----
Index: ImagePanel.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/ImagePanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ImagePanel.java 9 Apr 2003 07:48:12 -0000 1.4
--- ImagePanel.java 11 Dec 2003 06:41:29 -0000 1.5
***************
*** 75,79 ****
import java.net.URL;
import javax.swing.JPanel;
-
/**
* A panel for displaying image
--- 75,78 ----
***************
*** 82,86 ****
* @version $Revision$
*/
-
public class ImagePanel extends JPanel {
--- 81,84 ----
Index: LogPanel.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/LogPanel.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LogPanel.java 9 Apr 2003 07:48:12 -0000 1.4
--- LogPanel.java 11 Dec 2003 06:41:29 -0000 1.5
***************
*** 80,84 ****
import javax.swing.text.SimpleAttributeSet;
import javax.swing.text.StyleConstants;
-
/**
* A text panel for showing log messages
--- 80,83 ----
***************
*** 87,91 ****
* @version $Revision$
*/
-
public class LogPanel extends JTextPane {
/** Internal attribute set object for formatting the messages */
--- 86,89 ----
Index: MessageBox.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/MessageBox.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MessageBox.java 9 Dec 2003 08:59:10 -0000 1.5
--- MessageBox.java 11 Dec 2003 06:41:29 -0000 1.6
***************
*** 74,84 ****
import java.awt.GridBagLayout;
import java.awt.Insets;
- import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
-
/**
* A dialog class for displaying simple messages
--- 74,83 ----
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
+ import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
/**
* A dialog class for displaying simple messages
***************
*** 87,91 ****
* @version $Revision$
*/
-
public class MessageBox extends JDialog {
--- 86,89 ----
Index: MessageFrame.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/MessageFrame.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** MessageFrame.java 31 Jul 2003 06:58:41 -0000 1.7
--- MessageFrame.java 11 Dec 2003 06:41:29 -0000 1.8
***************
*** 69,76 ****
package hk.hku.cecid.phoenix.message.monitor;
import java.awt.BorderLayout;
import java.awt.Color;
- import java.io.InputStream;
import java.io.IOException;
import java.io.StringReader;
import java.text.SimpleDateFormat;
--- 69,78 ----
package hk.hku.cecid.phoenix.message.monitor;
+ import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
+ import hk.hku.cecid.phoenix.message.packaging.PayloadContainer;
import java.awt.BorderLayout;
import java.awt.Color;
import java.io.IOException;
+ import java.io.InputStream;
import java.io.StringReader;
import java.text.SimpleDateFormat;
***************
*** 89,93 ****
import javax.xml.soap.SOAPException;
import javax.xml.transform.Source;
- import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
--- 91,94 ----
***************
*** 95,103 ****
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
! import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
! import hk.hku.cecid.phoenix.message.packaging.PayloadContainer;
! import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.Attributes;
!
/**
* A text panel for showing ebXML messages
--- 96,102 ----
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXResult;
! import javax.xml.transform.stream.StreamSource;
import org.xml.sax.Attributes;
! import org.xml.sax.helpers.DefaultHandler;
/**
* A text panel for showing ebXML messages
***************
*** 106,110 ****
* @version $Revision$
*/
-
public class MessageFrame extends JFrame {
/** The ebXML message to show */
--- 105,108 ----
Index: Monitor.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/Monitor.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Monitor.java 9 Apr 2003 07:48:14 -0000 1.19
--- Monitor.java 11 Dec 2003 06:41:29 -0000 1.20
***************
*** 69,87 ****
package hk.hku.cecid.phoenix.message.monitor;
import java.awt.BorderLayout;
import java.awt.Color;
- import java.net.URL;
import java.net.MalformedURLException;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
- import hk.hku.cecid.phoenix.common.util.Version;
- import hk.hku.cecid.phoenix.message.handler.ApplicationContext;
- import hk.hku.cecid.phoenix.message.handler.MessageListener;
- import hk.hku.cecid.phoenix.message.handler.Request;
- import hk.hku.cecid.phoenix.message.handler.RequestException;
- import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
-
/**
* GUI Demo for testing the functionality of MSH
--- 69,86 ----
package hk.hku.cecid.phoenix.message.monitor;
+ import hk.hku.cecid.phoenix.common.util.Version;
+ import hk.hku.cecid.phoenix.message.handler.ApplicationContext;
+ import hk.hku.cecid.phoenix.message.handler.MessageListener;
+ import hk.hku.cecid.phoenix.message.handler.Request;
+ import hk.hku.cecid.phoenix.message.handler.RequestException;
+ import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import java.awt.BorderLayout;
import java.awt.Color;
import java.net.MalformedURLException;
+ import java.net.URL;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
/**
* GUI Demo for testing the functionality of MSH
***************
*** 90,94 ****
* @version $Revision$
*/
-
public class Monitor extends JFrame implements MessageListener {
--- 89,92 ----
Index: SendPanel.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/SendPanel.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** SendPanel.java 23 May 2003 01:59:18 -0000 1.19
--- SendPanel.java 11 Dec 2003 06:41:29 -0000 1.20
***************
*** 69,87 ****
package hk.hku.cecid.phoenix.message.monitor;
- import java.awt.*;
- import java.awt.event.*;
- import java.util.*;
- import javax.swing.*;
- import javax.swing.border.*;
- import javax.activation.DataHandler;
- import javax.xml.soap.SOAPException;
- import hk.hku.cecid.phoenix.message.handler.Utility;
import hk.hku.cecid.phoenix.message.handler.Request;
import hk.hku.cecid.phoenix.message.handler.RequestException;
import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
!
/**
* A panel for sending messages
--- 69,103 ----
package hk.hku.cecid.phoenix.message.monitor;
import hk.hku.cecid.phoenix.message.handler.Request;
import hk.hku.cecid.phoenix.message.handler.RequestException;
+ import hk.hku.cecid.phoenix.message.handler.Utility;
import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.MessageOrder;
! import java.awt.Color;
! import java.awt.Dimension;
! import java.awt.GridBagConstraints;
! import java.awt.GridBagLayout;
! import java.awt.event.ActionEvent;
! import java.awt.event.ActionListener;
! import java.util.Date;
! import javax.activation.DataHandler;
! import javax.swing.ButtonGroup;
! import javax.swing.DefaultListModel;
! import javax.swing.JButton;
! import javax.swing.JCheckBox;
! import javax.swing.JComponent;
! import javax.swing.JFileChooser;
! import javax.swing.JLabel;
! import javax.swing.JList;
! import javax.swing.JPanel;
! import javax.swing.JPasswordField;
! import javax.swing.JRadioButton;
! import javax.swing.JScrollPane;
! import javax.swing.JTextField;
! import javax.swing.ListSelectionModel;
! import javax.swing.border.TitledBorder;
! import javax.xml.soap.SOAPException;
/**
* A panel for sending messages
***************
*** 90,94 ****
* @version $Revision$
*/
-
public class SendPanel extends JPanel {
--- 106,109 ----
Index: TabChangeListener.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/TabChangeListener.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TabChangeListener.java 9 Apr 2003 07:48:15 -0000 1.6
--- TabChangeListener.java 11 Dec 2003 06:41:29 -0000 1.7
***************
*** 70,76 ****
import javax.swing.JTabbedPane;
- import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;
!
/**
* Simple implementation to the <code>ChangeListenr</code> class for adding
--- 70,75 ----
import javax.swing.JTabbedPane;
import javax.swing.event.ChangeEvent;
! import javax.swing.event.ChangeListener;
/**
* Simple implementation to the <code>ChangeListenr</code> class for adding
***************
*** 80,84 ****
* @version $Revision$
*/
-
public class TabChangeListener implements ChangeListener {
--- 79,82 ----
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/common/util In directory sc8-pr-cvs1:/tmp/cvs-serv28830/src/hk/hku/cecid/phoenix/common/util Modified Files: AuthenticationManager.java PassTool.java Property.java TextProperty.java XMLProperty.java Log Message: Remove all unused imports. convert all wildcard imports to non-wildcard imports. Index: AuthenticationManager.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/common/util/AuthenticationManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AuthenticationManager.java 9 Apr 2003 07:47:21 -0000 1.2 --- AuthenticationManager.java 11 Dec 2003 06:41:28 -0000 1.3 *************** *** 82,86 **** import java.util.Vector; import sun.misc.BASE64Encoder; - /** * This class manages a password file for doing user authentication. --- 82,85 ---- Index: PassTool.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/common/util/PassTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PassTool.java 9 Apr 2003 07:47:22 -0000 1.2 --- PassTool.java 11 Dec 2003 06:41:28 -0000 1.3 *************** *** 72,76 **** import java.io.File; import java.io.InputStreamReader; - /** * A command line utility to manipulate the password file used by --- 72,75 ---- Index: Property.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/common/util/Property.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Property.java 9 Apr 2003 07:47:25 -0000 1.3 --- Property.java 11 Dec 2003 06:41:28 -0000 1.4 *************** *** 74,78 **** import java.util.Hashtable; import java.util.Vector; - /** * This is an abstract class for property file reader. We may implement --- 74,77 ---- Index: TextProperty.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/common/util/TextProperty.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TextProperty.java 9 Apr 2003 07:47:28 -0000 1.3 --- TextProperty.java 11 Dec 2003 06:41:28 -0000 1.4 *************** *** 73,77 **** import java.io.IOException; import java.util.Properties; - /** * This is a concrete implementation of the property object for loading --- 73,76 ---- Index: XMLProperty.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/common/util/XMLProperty.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XMLProperty.java 9 Apr 2003 07:47:29 -0000 1.5 --- XMLProperty.java 11 Dec 2003 06:41:28 -0000 1.6 *************** *** 73,83 **** import java.io.IOException; import java.util.ArrayList; - import java.util.List; - import java.util.StringTokenizer; - import java.util.Map; - import java.util.Iterator; import java.util.Enumeration; import java.util.HashMap; ! import org.jdom.Document; import org.jdom.Element; --- 73,82 ---- import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; ! import java.util.Iterator; ! import java.util.List; ! import java.util.Map; ! import java.util.StringTokenizer; import org.jdom.Document; import org.jdom.Element; *************** *** 85,89 **** import org.jdom.input.SAXBuilder; import org.jdom.output.XMLOutputter; - /** * This is a concrete implementation of the property object for loading --- 84,87 ---- |
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging
In directory sc8-pr-cvs1:/tmp/cvs-serv15054/src/hk/hku/cecid/phoenix/message/packaging
Modified Files:
AttachmentDataSource.java EbxmlMessage.java MessageHeader.java
MessageOrder.java PartialInputStream.java
Log Message:
Add two constructor on EbxmlMessage which can load
the message from file and InputStream. The logic is re-use the one
from MessageServer.
The logic on MessageServer is changed to allow support on DataSource
as input to load the message.
Change AttachmentDataSource to support DataSource as input.
Change class to reduce warning on making JavaDoc
Reduce the import * and unused import for some of the classes.
format some of the codes.
Index: AttachmentDataSource.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/AttachmentDataSource.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AttachmentDataSource.java 13 Jun 2003 06:52:37 -0000 1.9
--- AttachmentDataSource.java 9 Dec 2003 08:59:10 -0000 1.10
***************
*** 107,110 ****
--- 107,112 ----
private long length;
+
+ private DataSource dataSource;
/**
***************
*** 363,373 ****
final InputStream is = new PartialInputStream(fis, offset, length);
loadData(is);
this.contentType = contentType;
this.encoding = encoding;
}
else {
this.contentType = contentType;
this.encoding = encoding;
- this.name = fileName;
this.data = null;
this.offset = offset;
--- 365,393 ----
final InputStream is = new PartialInputStream(fis, offset, length);
loadData(is);
+ }
+ else {
+ this.name = fileName;
+ this.data = null;
+ this.offset = offset;
+ this.length = length;
+ }
+ this.contentType = contentType;
+ this.encoding = encoding;
+ }
+
+ public AttachmentDataSource(DataSource dataSource, long offset, long length,
+ String contentType, String encoding, boolean loadToMem)
+ throws IOException {
+ if (loadToMem) {
+ InputStream fis = dataSource.getInputStream();
+ final InputStream is = new PartialInputStream(fis, offset, length);
+ loadData(is);
this.contentType = contentType;
this.encoding = encoding;
}
else {
+ this.dataSource = dataSource;
this.contentType = contentType;
this.encoding = encoding;
this.data = null;
this.offset = offset;
***************
*** 377,387 ****
private void loadData(InputStream is) throws IOException {
! final byte[] buffer = new byte[4096];
! final ByteArrayOutputStream out = new ByteArrayOutputStream();
! for (int c=is.read(buffer) ; c!=-1 ; c=is.read(buffer))
! out.write(buffer, 0, c);
! this.data = out.toByteArray();
! this.offset = 0;
! this.length = data.length;
}
--- 397,416 ----
private void loadData(InputStream is) throws IOException {
! try {
! final byte[] buffer = new byte[4096];
! final ByteArrayOutputStream out = new ByteArrayOutputStream();
! for (int c=is.read(buffer) ; c!=-1 ; c=is.read(buffer))
! out.write(buffer, 0, c);
! this.data = out.toByteArray();
! this.offset = 0;
! this.length = data.length;
! out.close();
! } catch (IOException e) {
! throw e;
! } finally {
! if (is != null) {
! is.close();
! }
! }
}
***************
*** 409,419 ****
}
else {
! final File file = new File(name);
! if (file.length() < (offset + length)) {
! throw new IOException("Premature end-of-file: file name=" +
! name + " | file length=" + file.length() + " | offset=" +
! offset + " | length to be read=" + length);
}
- final FileInputStream fis = new FileInputStream(name);
is = new PartialInputStream(fis, offset, length);
}
--- 438,453 ----
}
else {
! InputStream fis = null;
! if (dataSource != null) {
! fis = dataSource.getInputStream();
! } else {
! final File file = new File(name);
! if (file.length() < (offset + length)) {
! throw new IOException("Premature end-of-file: file name=" +
! name + " | file length=" + file.length() + " | offset=" +
! offset + " | length to be read=" + length);
! }
! fis = new FileInputStream(name);
}
is = new PartialInputStream(fis, offset, length);
}
***************
*** 476,486 ****
else {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
! final FileInputStream fis = new FileInputStream(name);
! final PartialInputStream in = new PartialInputStream
! (fis, offset, length);
! final byte[] buffer = new byte[4096];
! for (int c=in.read(buffer) ; c!=-1 ; c=in.read(buffer))
! out.write(buffer, 0, c);
! return out.toByteArray();
}
}
--- 510,538 ----
else {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
! InputStream fis = null;
! try {
! if (dataSource != null) {
! fis = dataSource.getInputStream();
! } else {
! fis = new FileInputStream(name);
! }
! final PartialInputStream in = new PartialInputStream
! (fis, offset, length);
! final byte[] buffer = new byte[4096];
! for (int c=in.read(buffer) ; c!=-1 ; c=in.read(buffer))
! out.write(buffer, 0, c);
! return out.toByteArray();
! } catch (IOException e) {
! throw e;
! } finally {
! if (fis != null) {
! try {
! out.close();
! fis.close();
! } catch (IOException e) {
! throw e;
! }
! }
! }
}
}
Index: EbxmlMessage.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** EbxmlMessage.java 17 Nov 2003 02:09:33 -0000 1.37
--- EbxmlMessage.java 9 Dec 2003 08:59:10 -0000 1.38
***************
*** 1,84 ****
/*
! * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
! * University of Hong Kong (HKU). All Rights Reserved.
*
! * This software is licensed under the Academic Free License Version 1.0
*
! * Academic Free License
! * Version 1.0
*
! * This Academic Free License applies to any software and associated
[...2215 lines suppressed...]
+ /**
+ * Sets the fileName attribute of the EbxmlMessage object
+ *
+ * @param filename The new fileName value
+ */
public void setFileName(String filename) {
this.filename = filename;
}
+ /**
+ * Gets the fileName attribute of the EbxmlMessage object
+ *
+ * @return The fileName value
+ */
public String getFileName() {
return filename;
}
}
+
Index: MessageHeader.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/MessageHeader.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** MessageHeader.java 27 Jun 2003 01:44:58 -0000 1.13
--- MessageHeader.java 9 Dec 2003 08:59:10 -0000 1.14
***************
*** 865,869 ****
*
* @param conversationId Conversation ID of the message.
! * @exception SOAPException
*/
public void setConversationId(String conversationId)
--- 865,869 ----
*
* @param conversationId Conversation ID of the message.
! * @throws SOAPException
*/
public void setConversationId(String conversationId)
***************
*** 913,917 ****
*
* @param serviceName Service name.
! * @exception SOAPException
*/
public void setService(String serviceName) throws SOAPException {
--- 913,917 ----
*
* @param serviceName Service name.
! * @throws SOAPException
*/
public void setService(String serviceName) throws SOAPException {
***************
*** 974,978 ****
* Set optional "type" attribute in service element
*
! * @exception SOAPException
*/
public void setServiceType(String type) throws SOAPException {
--- 974,978 ----
* Set optional "type" attribute in service element
*
! * @throws SOAPException
*/
public void setServiceType(String type) throws SOAPException {
***************
*** 1006,1010 ****
*
* @param action Action name.
! * @exception SOAPException
*/
public void setAction(String action) throws SOAPException {
--- 1006,1010 ----
*
* @param action Action name.
! * @throws SOAPException
*/
public void setAction(String action) throws SOAPException {
***************
*** 1205,1209 ****
* set as TimeToLive value.
*
! * @exception SOAPException
*/
public void setTimeToLive(Date time)
--- 1205,1209 ----
* set as TimeToLive value.
*
! * @throws SOAPException
*/
public void setTimeToLive(Date time)
Index: MessageOrder.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/MessageOrder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MessageOrder.java 9 Apr 2003 07:48:26 -0000 1.5
--- MessageOrder.java 9 Dec 2003 08:59:10 -0000 1.6
***************
*** 152,156 ****
* SequenceNumber element.
*
! * @exception SOAPException
*/
MessageOrder(SOAPEnvelope soapEnvelope, SOAPElement soapElement)
--- 152,156 ----
* SequenceNumber element.
*
! * @throws SOAPException
*/
MessageOrder(SOAPEnvelope soapEnvelope, SOAPElement soapElement)
Index: PartialInputStream.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/PartialInputStream.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PartialInputStream.java 9 Apr 2003 07:48:27 -0000 1.3
--- PartialInputStream.java 9 Dec 2003 08:59:10 -0000 1.4
***************
*** 1,74 ****
/*
! * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
! * University of Hong Kong (HKU). All Rights Reserved.
*
! * This software is licensed under the Academic Free License Version 1.0
*
! * Academic Free License
! * Version 1.0
*
! * This Academic Free License applies to any software and associated
! * documentation (the "Software") whose owner (the "Licensor") has placed the
! * statement "Licensed under the Academic Free License Version 1.0" immediately
! * after the copyright notice that applies to the Software.
*
! * Permission is hereby granted, free of charge, to any person obtaining a copy
! * of the Software (1) to use, copy, modify, merge, publish, perform,
! * distribute, sublicense, and/or sell copies of the Software, and to permit
! * persons to whom the Software is furnished to do so, and (2) under patent
! * claims owned or controlled by the Licensor that are embodied in the Software
! * as furnished by the Licensor, to make, use, sell and offer for sale the
! * Software and derivative works thereof, subject to the following conditions:
*
! * - Redistributions of the Software in source code form must retain all
! * copyright notices in the Software as furnished by the Licensor, this list
! * of conditions, and the following disclaimers.
! * - Redistributions of the Software in executable form must reproduce all
! * copyright notices in the Software as furnished by the Licensor, this list
! * of conditions, and the following disclaimers in the documentation and/or
! * other materials provided with the distribution.
! * - Neither the names of Licensor, nor the names of any contributors to the
! * Software, nor any of their trademarks or service marks, may be used to
! * endorse or promote products derived from this Software without express
! * prior written permission of the Licensor.
*
! * DISCLAIMERS: LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE SOFTWARE IS
! * OWNED BY THE LICENSOR OR THAT THE SOFTWARE IS DISTRIBUTED BY LICENSOR UNDER
! * A VALID CURRENT LICENSE. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY
! * PRECEDING SENTENCE, THE SOFTWARE IS PROVIDED BY THE LICENSOR, CONTRIBUTORS
! * AND COPYRIGHT OWNERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
! * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
! * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
! * LICENSOR, CONTRIBUTORS OR COPYRIGHT OWNERS BE LIABLE FOR ANY CLAIM, DAMAGES
! * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
! * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE.
*
! * This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved.
! * Permission is hereby granted to copy and distribute this license without
! * modification. This license may not be modified without the express written
! * permission of its copyright owner.
*/
!
! /* =====
*
! * $Header$
*
! * Code authored by:
*
! * cyng [2002-07-29]
*
! * Code reviewed by:
*
! * username [YYYY-MM-DD]
*
! * Remarks:
*
! * =====
*/
-
package hk.hku.cecid.phoenix.message.packaging;
import java.io.InputStream;
- import java.io.IOException;
/**
--- 1,73 ----
/*
! * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
! * University of Hong Kong (HKU). All Rights Reserved.
*
! * This software is licensed under the Academic Free License Version 1.0
*
! * Academic Free License
! * Version 1.0
*
! * This Academic Free License applies to any software and associated
! * documentation (the "Software") whose owner (the "Licensor") has placed the
! * statement "Licensed under the Academic Free License Version 1.0" immediately
! * after the copyright notice that applies to the Software.
*
! * Permission is hereby granted, free of charge, to any person obtaining a copy
! * of the Software (1) to use, copy, modify, merge, publish, perform,
! * distribute, sublicense, and/or sell copies of the Software, and to permit
! * persons to whom the Software is furnished to do so, and (2) under patent
! * claims owned or controlled by the Licensor that are embodied in the Software
! * as furnished by the Licensor, to make, use, sell and offer for sale the
! * Software and derivative works thereof, subject to the following conditions:
*
! * - Redistributions of the Software in source code form must retain all
! * copyright notices in the Software as furnished by the Licensor, this list
! * of conditions, and the following disclaimers.
! * - Redistributions of the Software in executable form must reproduce all
! * copyright notices in the Software as furnished by the Licensor, this list
! * of conditions, and the following disclaimers in the documentation and/or
! * other materials provided with the distribution.
! * - Neither the names of Licensor, nor the names of any contributors to the
! * Software, nor any of their trademarks or service marks, may be used to
! * endorse or promote products derived from this Software without express
! * prior written permission of the Licensor.
*
! * DISCLAIMERS: LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE SOFTWARE IS
! * OWNED BY THE LICENSOR OR THAT THE SOFTWARE IS DISTRIBUTED BY LICENSOR UNDER
! * A VALID CURRENT LICENSE. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY
! * PRECEDING SENTENCE, THE SOFTWARE IS PROVIDED BY THE LICENSOR, CONTRIBUTORS
! * AND COPYRIGHT OWNERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
! * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
! * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
! * LICENSOR, CONTRIBUTORS OR COPYRIGHT OWNERS BE LIABLE FOR ANY CLAIM, DAMAGES
! * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
! * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE.
*
! * This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved.
! * Permission is hereby granted to copy and distribute this license without
! * modification. This license may not be modified without the express written
! * permission of its copyright owner.
*/
! /*
! * =====
*
! * $Header$
*
! * Code authored by:
*
! * cyng [2002-07-29]
*
! * Code reviewed by:
*
! * username [YYYY-MM-DD]
*
! * Remarks:
*
! * =====
*/
package hk.hku.cecid.phoenix.message.packaging;
+ import java.io.IOException;
import java.io.InputStream;
/**
***************
*** 87,92 ****
private long currentRead;
PartialInputStream(InputStream in, long offset, long length)
! throws IOException {
this.in = in;
this.length = length;
--- 86,99 ----
private long currentRead;
+ /**
+ * Constructor for the PartialInputStream object
+ *
+ * @param in the origninal input stream
+ * @param offset the offset the read data from the stream.
+ * @param length the length of the data to be read
+ * @exception IOException Description of the Exception
+ */
PartialInputStream(InputStream in, long offset, long length)
! throws IOException {
this.in = in;
this.length = length;
***************
*** 102,109 ****
--- 109,127 ----
}
+ /**
+ * close the stream
+ *
+ * @exception IOException thrown when IO error occur during closing
+ */
public void close() throws IOException {
in.close();
}
+ /**
+ * read a byte from the stream
+ *
+ * @return the byte in int value from the stream.
+ * @exception IOException thrown when IO error occur during reading.
+ */
public int read() throws IOException {
if (currentRead < length) {
***************
*** 113,120 ****
}
return r;
! }
! else {
return -1;
}
}
}
--- 131,138 ----
}
return r;
! } else {
return -1;
}
}
}
+
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv15054/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
Constants.java DiagTool.java MessageServer.java
MessageServiceHandler.java Request.java
SignalMessageGenerator.java
Log Message:
Add two constructor on EbxmlMessage which can load
the message from file and InputStream. The logic is re-use the one
from MessageServer.
The logic on MessageServer is changed to allow support on DataSource
as input to load the message.
Change AttachmentDataSource to support DataSource as input.
Change class to reduce warning on making JavaDoc
Reduce the import * and unused import for some of the classes.
format some of the codes.
Index: Constants.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Constants.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** Constants.java 21 Nov 2003 02:00:04 -0000 1.33
--- Constants.java 9 Dec 2003 08:59:04 -0000 1.34
***************
*** 290,296 ****
"MSH/Persistent/Database/MaximumIdle";
-
- // Settings for SSL
-
/**
* Service name reserved for services described in ebXML Message Service
--- 290,293 ----
***************
*** 331,334 ****
--- 328,332 ----
public static final String ACTION_STATUS_RESPONSE = "StatusResponse";
+ // Settings for SSL
/**
Path to access the classname of customized Hostname verifier for
***************
*** 1053,1057 ****
* object in <code>MessageServiceHandler</code>.
*/
! static final String SERIALIZABLE_OBJECT =
"application/octet-stream";
--- 1051,1055 ----
* object in <code>MessageServiceHandler</code>.
*/
! public static final String SERIALIZABLE_OBJECT =
"application/octet-stream";
Index: DiagTool.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DiagTool.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** DiagTool.java 9 Apr 2003 07:47:40 -0000 1.13
--- DiagTool.java 9 Dec 2003 08:59:06 -0000 1.14
***************
*** 600,604 ****
* Show a warning message.
*
! * @param errorMessage Message to be displayed.
*/
public static void showWarning(String warnMessage) {
--- 600,604 ----
* Show a warning message.
*
! * @param warnMessage Message to be displayed.
*/
public static void showWarning(String warnMessage) {
Index: MessageServer.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServer.java,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** MessageServer.java 31 Jul 2003 06:57:48 -0000 1.141
--- MessageServer.java 9 Dec 2003 08:59:07 -0000 1.142
***************
*** 1,81 ****
/*
! * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
! * University of Hong Kong (HKU). All Rights Reserved.
*
! * This software is licensed under the Academic Free License Version 1.0
*
! * Academic Free License
! * Version 1.0
*
! * This Academic Free License applies to any software and associated
[...7097 lines suppressed...]
+ * Gets the finalState attribute of the MessageServer class
+ *
+ * @param state Description of the Parameter
+ * @return The finalState value
+ */
public static boolean isFinalState(int state) {
return state == STATE_ACKNOWLEDGED || state == STATE_SENT_FAILED ||
! state == STATE_DELETED || state == STATE_SENT ||
! state == STATE_SENT_RECEIVED ||
! state == STATE_RECEIVED_ACKNOWLEDGED || state == STATE_RECEIVED;
}
+ /**
+ * Gets the delivered attribute of the MessageServer class
+ *
+ * @param sequenceNumber Description of the Parameter
+ * @return The delivered value
+ */
public static boolean isDelivered(int sequenceNumber) {
return sequenceNumber <= FIRST_MESSAGE_DELIVERED;
Index: MessageServiceHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v
retrieving revision 1.178
retrieving revision 1.179
diff -C2 -d -r1.178 -r1.179
*** MessageServiceHandler.java 21 Nov 2003 02:00:05 -0000 1.178
--- MessageServiceHandler.java 9 Dec 2003 08:59:07 -0000 1.179
***************
*** 959,963 ****
* </ul>
*
! * @exception MessageServiceHandlerException
*/
public MessageServiceHandler() throws MessageServiceHandlerException {
--- 959,963 ----
* </ul>
*
! * @throws MessageServiceHandlerException
*/
public MessageServiceHandler() throws MessageServiceHandlerException {
***************
*** 1262,1267 ****
* of this servlet is written.
*
! * @exception ServletException
! * @exception IOException
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
--- 1262,1267 ----
* of this servlet is written.
*
! * @throws ServletException
! * @throws IOException
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
***************
*** 1286,1291 ****
* @param response HTTP servlet response object to which the response
* of this servlet is written.
! * @exception ServletException
! * @exception IOException
*/
public void doPost(HttpServletRequest request,
--- 1286,1291 ----
* @param response HTTP servlet response object to which the response
* of this servlet is written.
! * @throws ServletException
! * @throws IOException
*/
public void doPost(HttpServletRequest request,
***************
*** 1495,1499 ****
* @return Connection to the message service handler.
*
! * @exception MessageServiceHandlerException
*/
public MessageServiceHandlerConnection
--- 1495,1499 ----
* @return Connection to the message service handler.
*
! * @throws MessageServiceHandlerException
*/
public MessageServiceHandlerConnection
***************
*** 1621,1625 ****
* @return true if unregistration succeeded, false otherwise
*
! * @exception MessageServiceHandlerException
*/
public boolean unregister(MessageServiceHandlerConfig mshConfig)
--- 1621,1625 ----
* @return true if unregistration succeeded, false otherwise
*
! * @throws MessageServiceHandlerException
*/
public boolean unregister(MessageServiceHandlerConfig mshConfig)
***************
*** 2316,2320 ****
* otherwise.
*
! * @exception MessageServiceHandlerException
*/
private boolean verify(EbxmlMessage ebxmlMessage)
--- 2316,2320 ----
* otherwise.
*
! * @throws MessageServiceHandlerException
*/
private boolean verify(EbxmlMessage ebxmlMessage)
***************
*** 2472,2476 ****
* @return Acknowledgement message.
*
! * @exception MessageServiceHandlerException
*/
private EbxmlMessage generateAcknowledgment(EbxmlMessage
--- 2472,2476 ----
* @return Acknowledgement message.
*
! * @throws MessageServiceHandlerException
*/
private EbxmlMessage generateAcknowledgment(EbxmlMessage
***************
*** 2530,2534 ****
* @return Status response message.
*
! * @exception MessageServiceHandlerException
*/
private EbxmlMessage generateStatusResponseMessage
--- 2530,2534 ----
* @return Status response message.
*
! * @throws MessageServiceHandlerException
*/
private EbxmlMessage generateStatusResponseMessage
***************
*** 2579,2583 ****
* @return ebXML message containing error code.
*
! * @exception MessageServiceHandlerException
*/
private EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
--- 2579,2583 ----
* @return ebXML message containing error code.
*
! * @throws MessageServiceHandlerException
*/
private EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
***************
*** 2601,2605 ****
* @return ebXML message containing error code.
*
! * @exception MessageServiceHandlerException
*/
private EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
--- 2601,2605 ----
* @return ebXML message containing error code.
*
! * @throws MessageServiceHandlerException
*/
private EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
***************
*** 2637,2641 ****
* @return Pong message in response of the incoming ping message.
*
! * @exception MessageServiceHandlerException
*/
private EbxmlMessage generatePongMessage(EbxmlMessage pingMessage)
--- 2637,2641 ----
* @return Pong message in response of the incoming ping message.
*
! * @throws MessageServiceHandlerException
*/
private EbxmlMessage generatePongMessage(EbxmlMessage pingMessage)
***************
*** 2675,2679 ****
* store; false otherwise.
*
! * @exception MessageServiceHandlerException
* @throws MessageServerException
*/
--- 2675,2679 ----
* store; false otherwise.
*
! * @throws MessageServiceHandlerException
* @throws MessageServerException
*/
Index: Request.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Request.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** Request.java 31 Jul 2003 06:57:48 -0000 1.74
--- Request.java 9 Dec 2003 08:59:08 -0000 1.75
***************
*** 1,81 ****
/*
! * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
! * University of Hong Kong (HKU). All Rights Reserved.
*
! * This software is licensed under the Academic Free License Version 1.0
*
! * Academic Free License
! * Version 1.0
*
! * This Academic Free License applies to any software and associated
[...4098 lines suppressed...]
try {
***************
*** 2146,2153 ****
transformer.transform(source, result);
return writer.toString();
! }
! catch (Exception e) {
throw new RequestException(e.getMessage());
}
}
}
--- 2379,2386 ----
transformer.transform(source, result);
return writer.toString();
! } catch (Exception e) {
throw new RequestException(e.getMessage());
}
}
}
+
Index: SignalMessageGenerator.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/SignalMessageGenerator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SignalMessageGenerator.java 21 Nov 2003 02:00:05 -0000 1.1
--- SignalMessageGenerator.java 9 Dec 2003 08:59:09 -0000 1.2
***************
*** 104,108 ****
* above.
*
! * @exception SOAPException
*/
private static EbxmlMessage generateResponseMessage(
--- 104,108 ----
* above.
*
! * @throws SOAPException
*/
private static EbxmlMessage generateResponseMessage(
***************
*** 141,145 ****
* @return Acknowledgement message.
*
! * @exception SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
--- 141,145 ----
* @return Acknowledgement message.
*
! * @throws SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
***************
*** 190,199 ****
*
* @param ackRequestedMessage Acknowledgement request message.
- * @param refToMessageId MessageId of the message to which the
- * acknowledgement response should be referred.
*
* @return Acknowledgement message.
*
! * @exception SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
--- 190,197 ----
*
* @param ackRequestedMessage Acknowledgement request message.
*
* @return Acknowledgement message.
*
! * @throws SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
***************
*** 213,217 ****
* @return Status response message.
*
! * @exception SOAPException
*/
public static EbxmlMessage generateStatusResponseMessage(
--- 211,215 ----
* @return Status response message.
*
! * @throws SOAPException
*/
public static EbxmlMessage generateStatusResponseMessage(
***************
*** 251,255 ****
* @return ebXML message containing error code.
*
! * @exception SOAPException
*/
public static EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
--- 249,253 ----
* @return ebXML message containing error code.
*
! * @throws SOAPException
*/
public static EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
***************
*** 273,277 ****
* @return Pong message in response of the incoming ping message.
*
! * @exception SOAPException
*/
public static EbxmlMessage generatePongMessage(EbxmlMessage pingMessage)
--- 271,275 ----
* @return Pong message in response of the incoming ping message.
*
! * @throws SOAPException
*/
public static EbxmlMessage generatePongMessage(EbxmlMessage pingMessage)
|
|
From: <bob...@us...> - 2003-12-09 08:59:14
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor
In directory sc8-pr-cvs1:/tmp/cvs-serv15054/src/hk/hku/cecid/phoenix/message/monitor
Modified Files:
ConfigDialog.java MessageBox.java
Log Message:
Add two constructor on EbxmlMessage which can load
the message from file and InputStream. The logic is re-use the one
from MessageServer.
The logic on MessageServer is changed to allow support on DataSource
as input to load the message.
Change AttachmentDataSource to support DataSource as input.
Change class to reduce warning on making JavaDoc
Reduce the import * and unused import for some of the classes.
format some of the codes.
Index: ConfigDialog.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/ConfigDialog.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** ConfigDialog.java 9 Apr 2003 07:48:08 -0000 1.14
--- ConfigDialog.java 9 Dec 2003 08:59:09 -0000 1.15
***************
*** 193,197 ****
* draws UI of the dialog.
*
! * @param parant main program
*/
public ConfigDialog(Monitor parent) {
--- 193,197 ----
* draws UI of the dialog.
*
! * @param parent main program
*/
public ConfigDialog(Monitor parent) {
Index: MessageBox.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/monitor/MessageBox.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MessageBox.java 9 Apr 2003 07:48:13 -0000 1.4
--- MessageBox.java 9 Dec 2003 08:59:10 -0000 1.5
***************
*** 93,97 ****
* Construct the message box.
*
! * @param parant the parent window of the message box
* @param title the title to show on the message box
* @param message the message to show on the message box
--- 93,97 ----
* Construct the message box.
*
! * @param parent the parent window of the message box
* @param title the title to show on the message box
* @param message the message to show on the message box
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv25955/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
Tag: b0931
Constants.java MessageProcessor.java
MessageServiceHandler.java
Added Files:
Tag: b0931
SignalMessageGenerator.java
Log Message:
Move the logic of making StatusResponse Message, Acknowledgment Message
Pong Message and Error Message from MessageServiceHandler to a new class
called SignalMessageGenerator
Move some constants from MessageServiceHandler to Constants.java
--- NEW FILE: SignalMessageGenerator.java ---
/*
* Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
* University of Hong Kong (HKU). All Rights Reserved.
*
* This software is licensed under the Academic Free License Version 1.0
*
* Academic Free License
* Version 1.0
*
* This Academic Free License applies to any software and associated
* documentation (the "Software") whose owner (the "Licensor") has placed the
* statement "Licensed under the Academic Free License Version 1.0" immediately
* after the copyright notice that applies to the Software.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of the Software (1) to use, copy, modify, merge, publish, perform,
* distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, and (2) under patent
* claims owned or controlled by the Licensor that are embodied in the Software
* as furnished by the Licensor, to make, use, sell and offer for sale the
* Software and derivative works thereof, subject to the following conditions:
*
* - Redistributions of the Software in source code form must retain all
* copyright notices in the Software as furnished by the Licensor, this list
* of conditions, and the following disclaimers.
* - Redistributions of the Software in executable form must reproduce all
* copyright notices in the Software as furnished by the Licensor, this list
* of conditions, and the following disclaimers in the documentation and/or
* other materials provided with the distribution.
* - Neither the names of Licensor, nor the names of any contributors to the
* Software, nor any of their trademarks or service marks, may be used to
* endorse or promote products derived from this Software without express
* prior written permission of the Licensor.
*
* DISCLAIMERS: LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE SOFTWARE IS
* OWNED BY THE LICENSOR OR THAT THE SOFTWARE IS DISTRIBUTED BY LICENSOR UNDER
* A VALID CURRENT LICENSE. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY
* PRECEDING SENTENCE, THE SOFTWARE IS PROVIDED BY THE LICENSOR, CONTRIBUTORS
* AND COPYRIGHT OWNERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* LICENSOR, CONTRIBUTORS OR COPYRIGHT OWNERS BE LIABLE FOR ANY CLAIM, DAMAGES
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE.
*
* This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved.
* Permission is hereby granted to copy and distribute this license without
* modification. This license may not be modified without the express written
* permission of its copyright owner.
*/
/* =====
*
* $Header: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/SignalMessageGenerator.java,v 1.1.2.1 2003/11/21 02:34:41 bobpykoon Exp $
*
* Code authored by:
*
* pykoon [2002-11-21]
*
* Code reviewed by:
*
* username [YYYY-MM-DD]
*
* Remarks:
*
* =====
*/
package hk.hku.cecid.phoenix.message.handler;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
import hk.hku.cecid.phoenix.message.packaging.ErrorList;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.Signature;
import hk.hku.cecid.phoenix.message.packaging.SignatureReference;
import javax.xml.soap.SOAPException;
import java.util.Date;
import java.util.Iterator;
/**
* <code>SignalMessageGenerator</code> is an utility api for the user to
* generate some signal message
* @author pykoon
* @version $Revision: 1.1.2.1 $
*/
public class SignalMessageGenerator {
/**
* Generate a simple response message containing required elements in
* message header. They include:
* <ul>
* <li>From/PartyId [ebMSS 3.1.1]</li>
* <li>To/PartyId [ebMSS 3.1.1]</li>
* <li>CPAId [ebMSS 3.1.2].</li>
* <li>ConversationId [ebMSS 3.1.3].</li>
* <li>Service [ebMSS 3.1.4].</li>
* <li>Action [ebMSS 3.1.5].</li>
* <li>MessageId [ebMSS 3.1.6.1].</li>
* <li>Timestamp [ebMSS 3.1.6.2].</li>
* </ul>
*
* @param requestMessage Request message for which a response message
* shall be generated.
* @param action Name of the action.
*
* @return An {@link EbxmlMessage} that contains the fields mentioned
* above.
*
* @exception SOAPException
*/
private static EbxmlMessage generateResponseMessage(
EbxmlMessage requestMessage, String action) throws SOAPException {
final EbxmlMessage responseMessage;
responseMessage = new EbxmlMessage();
final MessageHeader.PartyId fromParty = (MessageHeader.PartyId)
requestMessage.getToPartyIds().next();
final String fromPartyId = fromParty.getId();
final String fromPartyIdType = fromParty.getType();
final MessageHeader.PartyId toParty = (MessageHeader.PartyId)
requestMessage.getFromPartyIds().next();
final String toPartyId = toParty.getId();
final String toPartyIdType = toParty.getType();
final Date date = new Date();
final String timeStamp = Utility.toUTCString(date);
final String messageId = Utility.generateMessageId(date, toPartyId,
requestMessage.getCpaId(), Constants.SERVICE, action);
responseMessage.addMessageHeader(fromPartyId, fromPartyIdType,
toPartyId, toPartyIdType, requestMessage.getCpaId(),
requestMessage.getConversationId(), Constants.SERVICE, action, messageId,
timeStamp);
return responseMessage;
}
/**
* Generates acknowledgement message from the given acknowledgement
* request message and the refToMessageId.
* Note that the acknowledgment message is not signed.
*
* @param ackRequestedMessage Acknowledgement request message.
* @param refToMessageId MessageId of the message to which the
* acknowledgement response should be referred.
*
* @return Acknowledgement message.
*
* @exception SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
EbxmlMessage ackRequestedMessage, String refToMessageId)
throws SOAPException {
final EbxmlMessage ackMessage = generateResponseMessage(
ackRequestedMessage, Constants.ACTION_ACKNOWLEDGMENT);
final MessageHeader messageHeader = ackMessage.getMessageHeader();
messageHeader.setRefToMessageId(refToMessageId);
if (ackRequestedMessage.getDuplicateElimination()) {
messageHeader.setDuplicateElimination();
}
Iterator toParties = ackRequestedMessage.getToPartyIds();
if (toParties.hasNext()) {
MessageHeader.PartyId party =
(MessageHeader.PartyId) toParties.next();
ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
ackRequestedMessage, party.getId(), party.getType());
} else {
/*
ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
ackRequestedMessage, mshUrl);
*/
throw new SOAPException(
"Missing To party Id on ack request message");
}
Iterator signatures = ackRequestedMessage.getSignatures();
if (signatures.hasNext()) {
Acknowledgment ack = ackMessage.getAcknowledgment();
for (Iterator i=((Signature) signatures.next()).
getReferences() ; i.hasNext() ; ) {
ack.addSignatureReference((SignatureReference) i.next());
}
ackMessage.getSOAPMessage().getSOAPPart().getEnvelope().
addNamespaceDeclaration(Signature.NAMESPACE_PREFIX_DS,
Signature.NAMESPACE_URI_DS);
ackMessage.saveChanges();
}
return ackMessage;
}
/**
* Generates acknowledgement message from the given acknowledgement
* request message and the refToMessageId.
* Note that the acknowledgment message is not signed.
*
* @param ackRequestedMessage Acknowledgement request message.
* @param refToMessageId MessageId of the message to which the
* acknowledgement response should be referred.
*
* @return Acknowledgement message.
*
* @exception SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
EbxmlMessage ackRequestedMessage) throws SOAPException {
return generateAcknowledgment(ackRequestedMessage,
ackRequestedMessage.getMessageId());
}
/**
* Generates response message from the given status request message and
* the status string [ebMSS 7.1.2].
*
* @param statusRequestMessage Status request message.
* @param status Current status of the message service
* handler.
*
* @return Status response message.
*
* @exception SOAPException
*/
public static EbxmlMessage generateStatusResponseMessage(
EbxmlMessage statusRequestMessage, String status, String timestamp)
throws SOAPException {
final EbxmlMessage statusResponseMessage = generateResponseMessage(
statusRequestMessage, Constants.ACTION_STATUS_RESPONSE);
statusResponseMessage.getMessageHeader().setRefToMessageId(
statusRequestMessage.getMessageId());
final String refToMessageId
= statusRequestMessage.getStatusRequest().getRefToMessageId();
if (status.equals(Constants.STATUS_UN_AUTHORIZED) ||
status.equals(Constants.STATUS_NOT_RECOGNIZED)) {
statusResponseMessage.addStatusResponse(refToMessageId, status);
}
else {
long time = Long.parseLong(timestamp);
Date date = new Date(time);
String utcTime = Utility.toUTCString(date);
statusResponseMessage.addStatusResponse(
refToMessageId, status, utcTime);
}
return statusResponseMessage;
}
/**
* Generates an error message containing the specfied error code
* [ebMSS 4.2.3.4.1].
*
* @param ebxmlMessage ebXML message to which error list should be
* attached.
* @param errorCode Error code of the message.
* @param severity Error severity, either ERROR or WARNING.
* @param description Human-readable description of the error message.
* @param location Source of the error.
*
* @return ebXML message containing error code.
*
* @exception SOAPException
*/
public static EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
String errorCode, String severity, String description,
String location) throws SOAPException {
final EbxmlMessage errorMessage = generateResponseMessage(
ebxmlMessage, Constants.ACTION_MESSAGE_ERROR);
errorMessage.getMessageHeader().
setRefToMessageId(ebxmlMessage.getMessageId());
errorMessage.addErrorList(errorCode, severity, description,
location);
errorMessage.saveChanges();
return errorMessage;
}
/**
* Generates pong message from the given ping message [ebMSS 8.2].
*
* @param pingMessage Incoming ping message.
*
* @return Pong message in response of the incoming ping message.
*
* @exception SOAPException
*/
public static EbxmlMessage generatePongMessage(EbxmlMessage pingMessage)
throws SOAPException {
final EbxmlMessage pongMessage = generateResponseMessage(
pingMessage, Constants.ACTION_PONG);
pongMessage.getMessageHeader().setRefToMessageId(
pingMessage.getMessageId());
pongMessage.saveChanges();
return pongMessage;
}
}
Index: Constants.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Constants.java,v
retrieving revision 1.20.2.5
retrieving revision 1.20.2.6
diff -C2 -d -r1.20.2.5 -r1.20.2.6
*** Constants.java 13 May 2003 22:13:25 -0000 1.20.2.5
--- Constants.java 21 Nov 2003 02:34:41 -0000 1.20.2.6
***************
*** 290,293 ****
--- 290,330 ----
"MSH/Persistent/Database/MaximumIdle";
+ /**
+ * Service name reserved for services described in ebXML Message Service
+ * Specification [ebMSS 3.1.4].
+ */
+ public static final String SERVICE =
+ "urn:oasis:names:tc:ebxml-msg:service";
+
+ /**
+ * Acknowledgement action [ebMSS 6.3.2.7]
+ */
+ public static final String ACTION_ACKNOWLEDGMENT = "Acknowledgment";
+
+ /**
+ * Action for an ErrorList element to be included in an independent
+ * message [ebMSS 4.2.4.3]
+ */
+ public static final String ACTION_MESSAGE_ERROR = "MessageError";
+
+ /**
+ * Action for ping message [ebMSS 8.1]
+ */
+ public static final String ACTION_PING = "Ping";
+
+ /**
+ * Action for pong message [ebMSS 8.2]
+ */
+ public static final String ACTION_PONG = "Pong";
+
+ /**
+ * Action for status request message [ebMSS 7.1.1]
+ */
+ public static final String ACTION_STATUS_REQUEST = "StatusRequest";
+
+ /**
+ * Action for status response message [ebMSS 7.1.2]
+ */
+ public static final String ACTION_STATUS_RESPONSE = "StatusResponse";
// Settings for Repositories
Index: MessageProcessor.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageProcessor.java,v
retrieving revision 1.43.2.5
retrieving revision 1.43.2.6
diff -C2 -d -r1.43.2.5 -r1.43.2.6
*** MessageProcessor.java 2 Jul 2003 07:00:52 -0000 1.43.2.5
--- MessageProcessor.java 21 Nov 2003 02:34:41 -0000 1.43.2.6
***************
*** 225,230 ****
ebxmlMessage.getErrorList() == null &&
ebxmlMessage.getStatusResponse() == null &&
! !(ebxmlMessage.getService().equals(MessageServiceHandler.SERVICE) &&
! ebxmlMessage.getAction().equals(MessageServiceHandler.ACTION_PONG));
messageSender = null;
boolean commError = false;
--- 225,230 ----
ebxmlMessage.getErrorList() == null &&
ebxmlMessage.getStatusResponse() == null &&
! !(ebxmlMessage.getService().equals(Constants.SERVICE) &&
! ebxmlMessage.getAction().equals(Constants.ACTION_PONG));
messageSender = null;
boolean commError = false;
***************
*** 593,603 ****
final String messageId = Utility.generateMessageId
(date, toPartyId, ebxmlMessage.getCpaId(),
! MessageServiceHandler.SERVICE,
! MessageServiceHandler.ACTION_STATUS_RESPONSE);
logger.debug("new message id: <" + messageId + ">");
positiveAckMessage.addMessageHeader(fromPartyId, toPartyId,
ebxmlMessage.getCpaId(), ebxmlMessage.getConversationId(),
! MessageServiceHandler.SERVICE, MessageServiceHandler.
! ACTION_STATUS_RESPONSE, messageId, timeStamp);
positiveAckMessage.getMessageHeader().
setRefToMessageId(ebxmlMessage.getMessageId());
--- 593,603 ----
final String messageId = Utility.generateMessageId
(date, toPartyId, ebxmlMessage.getCpaId(),
! Constants.SERVICE,
! Constants.ACTION_STATUS_RESPONSE);
logger.debug("new message id: <" + messageId + ">");
positiveAckMessage.addMessageHeader(fromPartyId, toPartyId,
ebxmlMessage.getCpaId(), ebxmlMessage.getConversationId(),
! Constants.SERVICE, Constants.ACTION_STATUS_RESPONSE,
! messageId, timeStamp);
positiveAckMessage.getMessageHeader().
setRefToMessageId(ebxmlMessage.getMessageId());
***************
*** 663,668 ****
errorMessage.addMessageHeader(toPartyId, toPartyType,
fromPartyId, fromPartyType, ebxmlMessage.getCpaId(),
! ebxmlMessage.getConversationId(), MessageServiceHandler.SERVICE,
! MessageServiceHandler.ACTION_MESSAGE_ERROR, messageId,
timeStamp).setRefToMessageId(ebxmlMessage.getMessageId());
errorMessage.addErrorList(errorCode, severity, description);
--- 663,668 ----
errorMessage.addMessageHeader(toPartyId, toPartyType,
fromPartyId, fromPartyType, ebxmlMessage.getCpaId(),
! ebxmlMessage.getConversationId(), Constants.SERVICE,
! Constants.ACTION_MESSAGE_ERROR, messageId,
timeStamp).setRefToMessageId(ebxmlMessage.getMessageId());
errorMessage.addErrorList(errorCode, severity, description);
Index: MessageServiceHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v
retrieving revision 1.148.2.19
retrieving revision 1.148.2.20
diff -C2 -d -r1.148.2.19 -r1.148.2.20
*** MessageServiceHandler.java 15 Aug 2003 08:09:22 -0000 1.148.2.19
--- MessageServiceHandler.java 21 Nov 2003 02:34:41 -0000 1.148.2.20
***************
*** 140,143 ****
--- 140,144 ----
* Service name reserved for services described in ebXML Message Service
* Specification [ebMSS 3.1.4].
+ @deprecated please use Constants.SERVICE
*/
public static final String SERVICE =
***************
*** 146,149 ****
--- 147,151 ----
/**
* Acknowledgement action [ebMSS 6.3.2.7]
+ * @deprecated please use Constants.ACTION_ACKNOWLEDGMENT
*/
public static final String ACTION_ACKNOWLEDGMENT = "Acknowledgment";
***************
*** 152,155 ****
--- 154,158 ----
* Action for an ErrorList element to be included in an independent
* message [ebMSS 4.2.4.3]
+ * @deprecated please use Constants.ACTION_MESSAGE_ERROR
*/
public static final String ACTION_MESSAGE_ERROR = "MessageError";
***************
*** 157,160 ****
--- 160,164 ----
/**
* Action for ping message [ebMSS 8.1]
+ * @deprecated please use Constants.ACTION_PING
*/
public static final String ACTION_PING = "Ping";
***************
*** 162,165 ****
--- 166,170 ----
/**
* Action for pong message [ebMSS 8.2]
+ * @deprecated please use Constants.ACTION_PONG
*/
public static final String ACTION_PONG = "Pong";
***************
*** 167,170 ****
--- 172,176 ----
/**
* Action for status request message [ebMSS 7.1.1]
+ * @deprecated please use Constants.ACTION_STATUS_REQUEST
*/
public static final String ACTION_STATUS_REQUEST = "StatusRequest";
***************
*** 172,175 ****
--- 178,182 ----
/**
* Action for status response message [ebMSS 7.1.2]
+ * @deprecated please use Constants.ACTION_STATUS_RESPONSE
*/
public static final String ACTION_STATUS_RESPONSE = "StatusResponse";
***************
*** 2357,2428 ****
/**
- * Generate a simple response message containing required elements in
- * message header. They include:
- * <ul>
- * <li>From/PartyId [ebMSS 3.1.1]</li>
- * <li>To/PartyId [ebMSS 3.1.1]</li>
- * <li>CPAId [ebMSS 3.1.2].</li>
- * <li>ConversationId [ebMSS 3.1.3].</li>
- * <li>Service [ebMSS 3.1.4].</li>
- * <li>Action [ebMSS 3.1.5].</li>
- * <li>MessageId [ebMSS 3.1.6.1].</li>
- * <li>Timestamp [ebMSS 3.1.6.2].</li>
- * </ul>
- *
- * @param requestMessage Request message for which a response message
- * shall be generated.
- * @param action Name of the action.
- *
- * @return An {@link EbxmlMessage} that contains the fields mentioned
- * above.
- *
- * @exception MessageServiceHandlerException
- */
- private EbxmlMessage generateResponseMessage(EbxmlMessage requestMessage,
- String action)
- throws MessageServiceHandlerException {
-
- logger.debug("=> MessageServiceHandler.generateResponseMessage");
-
- final EbxmlMessage responseMessage;
- try {
- responseMessage = new EbxmlMessage();
- final MessageHeader.PartyId fromParty = (MessageHeader.PartyId)
- requestMessage.getToPartyIds().next();
- final String fromPartyId = fromParty.getId();
- final String fromPartyIdType = fromParty.getType();
- final MessageHeader.PartyId toParty = (MessageHeader.PartyId)
- requestMessage.getFromPartyIds().next();
- final String toPartyId = toParty.getId();
- final String toPartyIdType = toParty.getType();
- final Date date = new Date();
- final String timeStamp = Utility.toUTCString(date);
- final String messageId = Utility.generateMessageId(date, toPartyId,
- requestMessage.getCpaId(), SERVICE, action);
-
- logger.debug("new message id: <" + messageId + ">");
- responseMessage.addMessageHeader(fromPartyId, fromPartyIdType,
- toPartyId, toPartyIdType, requestMessage.getCpaId(),
- requestMessage.getConversationId(), SERVICE, action, messageId,
- timeStamp);
- }
- catch (SOAPException e) {
- String err = ErrorMessages.getMessage(
- ErrorMessages.ERR_SOAP_GENERAL_ERROR, e);
- logger.warn(err);
- throw new MessageServiceHandlerException(err);
- }
- catch (Exception e) {
- String err = ErrorMessages.getMessage(
- ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e);
- logger.error(err);
- throw new MessageServiceHandlerException(err);
- }
-
- logger.debug("<= MessageServiceHandler.generateResponseMessage");
- return responseMessage;
- }
-
- /**
* Get the next undelivered message having the specified application
* context in the delivery record, or a random one if the message is
--- 2364,2367 ----
***************
*** 2541,2578 ****
try {
! final EbxmlMessage ackMessage = generateResponseMessage
! (ackRequestedMessage, ACTION_ACKNOWLEDGMENT);
!
! final MessageHeader messageHeader = ackMessage.getMessageHeader();
! messageHeader.setRefToMessageId(refToMessageId);
! logger.debug("refTo message id: <" + refToMessageId + ">");
! if (ackRequestedMessage.getDuplicateElimination()) {
! messageHeader.setDuplicateElimination();
! }
! Iterator toPartyIds = ackRequestedMessage.getToPartyIds();
! if (toPartyIds.hasNext()) {
! MessageHeader.PartyId partyId =
! (MessageHeader.PartyId) toPartyIds.next();
! ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
! ackRequestedMessage, partyId.getId(), partyId.getType());
! }
! else {
! ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
! ackRequestedMessage, mshUrl);
! }
!
! Iterator signatures = ackRequestedMessage.getSignatures();
! if (signatures.hasNext()) {
! Acknowledgment ack = ackMessage.getAcknowledgment();
! for (Iterator i=((Signature) signatures.next()).
! getReferences() ; i.hasNext() ; ) {
! ack.addSignatureReference((SignatureReference) i.next());
! }
! ackMessage.getSOAPMessage().getSOAPPart().getEnvelope().
! addNamespaceDeclaration(Signature.NAMESPACE_PREFIX_DS,
! Signature.NAMESPACE_URI_DS);
! ackMessage.saveChanges();
! }
!
if (ackRequestedMessage.getAckRequested().getSigned()) {
logger.debug("sign the Ack");
--- 2480,2486 ----
try {
! EbxmlMessage ackMessage
! = SignalMessageGenerator.generateAcknowledgment(
! ackRequestedMessage, refToMessageId);
if (ackRequestedMessage.getAckRequested().getSigned()) {
logger.debug("sign the Ack");
***************
*** 2603,2609 ****
throw new MessageServiceHandlerException(e.getMessage());
}
- catch (MessageServiceHandlerException e) {
- throw e;
- }
catch (Exception e) {
String err = ErrorMessages.getMessage(
--- 2511,2514 ----
***************
*** 2631,2653 ****
logger.debug("=> MessageServiceHandler.generateStatusResponseMessage");
!
! final EbxmlMessage statusResponseMessage = generateResponseMessage
! (statusRequestMessage, ACTION_STATUS_RESPONSE);
try {
! statusResponseMessage.getMessageHeader().
! setRefToMessageId(statusRequestMessage.getMessageId());
! final String refToMessageId = statusRequestMessage.
! getStatusRequest().getRefToMessageId();
! if (status.equals(Constants.STATUS_UN_AUTHORIZED) ||
! status.equals(Constants.STATUS_NOT_RECOGNIZED)) {
! statusResponseMessage.addStatusResponse(refToMessageId, status);
! }
! else {
! long time = Long.parseLong(timestamp);
! Date date = new Date(time);
! String utcTime = Utility.toUTCString(date);
! statusResponseMessage.
! addStatusResponse(refToMessageId, status, utcTime);
! }
}
catch (SOAPException e) {
--- 2536,2544 ----
logger.debug("=> MessageServiceHandler.generateStatusResponseMessage");
! EbxmlMessage statusResponseMessage = null;
try {
! statusResponseMessage
! = SignalMessageGenerator.generateStatusResponseMessage(
! statusRequestMessage, status, timestamp);
}
catch (SOAPException e) {
***************
*** 2716,2728 ****
logger.debug("=> MessageServiceHandler.generateErrorMessage");
!
! final EbxmlMessage errorMessage = generateResponseMessage
! (ebxmlMessage, ACTION_MESSAGE_ERROR);
try {
! errorMessage.getMessageHeader().
! setRefToMessageId(ebxmlMessage.getMessageId());
! errorMessage.addErrorList(errorCode, severity, description,
! location);
! errorMessage.saveChanges();
}
catch (SOAPException e) {
--- 2607,2614 ----
logger.debug("=> MessageServiceHandler.generateErrorMessage");
! EbxmlMessage errorMessage = null;
try {
! errorMessage = SignalMessageGenerator.generateErrorMessage(
! ebxmlMessage, errorCode, severity, description, location);
}
catch (SOAPException e) {
***************
*** 2757,2766 ****
logger.debug("=> MessageServiceHandler.generatePongMessage");
! final EbxmlMessage pongMessage =
! generateResponseMessage(pingMessage, ACTION_PONG);
try {
! pongMessage.getMessageHeader().
! setRefToMessageId(pingMessage.getMessageId());
! pongMessage.saveChanges();
}
catch (SOAPException e) {
--- 2643,2650 ----
logger.debug("=> MessageServiceHandler.generatePongMessage");
! EbxmlMessage pongMessage = null;
try {
! pongMessage = SignalMessageGenerator.generatePongMessage(
! pingMessage);
}
catch (SOAPException e) {
***************
*** 4430,4437 ****
final String service = ebxmlMessage.getService();
final String action = ebxmlMessage.getAction();
! final boolean isPing = service.equals(SERVICE) &&
! action.equals(ACTION_PING);
! final boolean isPong = service.equals(SERVICE) &&
! action.equals(ACTION_PONG);
final boolean isError = (ebxmlMessage.getErrorList() != null);
--- 4314,4321 ----
final String service = ebxmlMessage.getService();
final String action = ebxmlMessage.getAction();
! final boolean isPing = service.equals(Constants.SERVICE) &&
! action.equals(Constants.ACTION_PING);
! final boolean isPong = service.equals(Constants.SERVICE) &&
! action.equals(Constants.ACTION_PONG);
final boolean isError = (ebxmlMessage.getErrorList() != null);
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv21550/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
Constants.java MessageProcessor.java
MessageServiceHandler.java
Added Files:
SignalMessageGenerator.java
Log Message:
Move the logic of making StatusResponse Message, Acknowledgment Message
Pong Message and Error Message from MessageServiceHandler to a new class
called SignalMessageGenerator
Move some constants from MessageServiceHandler to Constants.java
--- NEW FILE: SignalMessageGenerator.java ---
/*
* Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The
* University of Hong Kong (HKU). All Rights Reserved.
*
* This software is licensed under the Academic Free License Version 1.0
*
* Academic Free License
* Version 1.0
*
* This Academic Free License applies to any software and associated
* documentation (the "Software") whose owner (the "Licensor") has placed the
* statement "Licensed under the Academic Free License Version 1.0" immediately
* after the copyright notice that applies to the Software.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of the Software (1) to use, copy, modify, merge, publish, perform,
* distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, and (2) under patent
* claims owned or controlled by the Licensor that are embodied in the Software
* as furnished by the Licensor, to make, use, sell and offer for sale the
* Software and derivative works thereof, subject to the following conditions:
*
* - Redistributions of the Software in source code form must retain all
* copyright notices in the Software as furnished by the Licensor, this list
* of conditions, and the following disclaimers.
* - Redistributions of the Software in executable form must reproduce all
* copyright notices in the Software as furnished by the Licensor, this list
* of conditions, and the following disclaimers in the documentation and/or
* other materials provided with the distribution.
* - Neither the names of Licensor, nor the names of any contributors to the
* Software, nor any of their trademarks or service marks, may be used to
* endorse or promote products derived from this Software without express
* prior written permission of the Licensor.
*
* DISCLAIMERS: LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE SOFTWARE IS
* OWNED BY THE LICENSOR OR THAT THE SOFTWARE IS DISTRIBUTED BY LICENSOR UNDER
* A VALID CURRENT LICENSE. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY
* PRECEDING SENTENCE, THE SOFTWARE IS PROVIDED BY THE LICENSOR, CONTRIBUTORS
* AND COPYRIGHT OWNERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* LICENSOR, CONTRIBUTORS OR COPYRIGHT OWNERS BE LIABLE FOR ANY CLAIM, DAMAGES
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE.
*
* This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved.
* Permission is hereby granted to copy and distribute this license without
* modification. This license may not be modified without the express written
* permission of its copyright owner.
*/
/* =====
*
* $Header: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/SignalMessageGenerator.java,v 1.1 2003/11/21 02:00:05 bobpykoon Exp $
*
* Code authored by:
*
* pykoon [2002-11-21]
*
* Code reviewed by:
*
* username [YYYY-MM-DD]
*
* Remarks:
*
* =====
*/
package hk.hku.cecid.phoenix.message.handler;
import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage;
import hk.hku.cecid.phoenix.message.packaging.Acknowledgment;
import hk.hku.cecid.phoenix.message.packaging.ErrorList;
import hk.hku.cecid.phoenix.message.packaging.MessageHeader;
import hk.hku.cecid.phoenix.message.packaging.Signature;
import hk.hku.cecid.phoenix.message.packaging.SignatureReference;
import javax.xml.soap.SOAPException;
import java.util.Date;
import java.util.Iterator;
/**
* <code>SignalMessageGenerator</code> is an utility api for the user to
* generate some signal message
* @author pykoon
* @version $Revision: 1.1 $
*/
public class SignalMessageGenerator {
/**
* Generate a simple response message containing required elements in
* message header. They include:
* <ul>
* <li>From/PartyId [ebMSS 3.1.1]</li>
* <li>To/PartyId [ebMSS 3.1.1]</li>
* <li>CPAId [ebMSS 3.1.2].</li>
* <li>ConversationId [ebMSS 3.1.3].</li>
* <li>Service [ebMSS 3.1.4].</li>
* <li>Action [ebMSS 3.1.5].</li>
* <li>MessageId [ebMSS 3.1.6.1].</li>
* <li>Timestamp [ebMSS 3.1.6.2].</li>
* </ul>
*
* @param requestMessage Request message for which a response message
* shall be generated.
* @param action Name of the action.
*
* @return An {@link EbxmlMessage} that contains the fields mentioned
* above.
*
* @exception SOAPException
*/
private static EbxmlMessage generateResponseMessage(
EbxmlMessage requestMessage, String action) throws SOAPException {
final EbxmlMessage responseMessage;
responseMessage = new EbxmlMessage();
final MessageHeader.PartyId fromParty = (MessageHeader.PartyId)
requestMessage.getToPartyIds().next();
final String fromPartyId = fromParty.getId();
final String fromPartyIdType = fromParty.getType();
final MessageHeader.PartyId toParty = (MessageHeader.PartyId)
requestMessage.getFromPartyIds().next();
final String toPartyId = toParty.getId();
final String toPartyIdType = toParty.getType();
final Date date = new Date();
final String timeStamp = Utility.toUTCString(date);
final String messageId = Utility.generateMessageId(date, toPartyId,
requestMessage.getCpaId(), Constants.SERVICE, action);
responseMessage.addMessageHeader(fromPartyId, fromPartyIdType,
toPartyId, toPartyIdType, requestMessage.getCpaId(),
requestMessage.getConversationId(), Constants.SERVICE, action, messageId,
timeStamp);
return responseMessage;
}
/**
* Generates acknowledgement message from the given acknowledgement
* request message and the refToMessageId.
* Note that the acknowledgment message is not signed.
*
* @param ackRequestedMessage Acknowledgement request message.
* @param refToMessageId MessageId of the message to which the
* acknowledgement response should be referred.
*
* @return Acknowledgement message.
*
* @exception SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
EbxmlMessage ackRequestedMessage, String refToMessageId)
throws SOAPException {
final EbxmlMessage ackMessage = generateResponseMessage(
ackRequestedMessage, Constants.ACTION_ACKNOWLEDGMENT);
final MessageHeader messageHeader = ackMessage.getMessageHeader();
messageHeader.setRefToMessageId(refToMessageId);
if (ackRequestedMessage.getDuplicateElimination()) {
messageHeader.setDuplicateElimination();
}
Iterator toParties = ackRequestedMessage.getToPartyIds();
if (toParties.hasNext()) {
MessageHeader.PartyId party =
(MessageHeader.PartyId) toParties.next();
ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
ackRequestedMessage, party.getId(), party.getType());
} else {
/*
ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
ackRequestedMessage, mshUrl);
*/
throw new SOAPException(
"Missing To party Id on ack request message");
}
Iterator signatures = ackRequestedMessage.getSignatures();
if (signatures.hasNext()) {
Acknowledgment ack = ackMessage.getAcknowledgment();
for (Iterator i=((Signature) signatures.next()).
getReferences() ; i.hasNext() ; ) {
ack.addSignatureReference((SignatureReference) i.next());
}
ackMessage.getSOAPMessage().getSOAPPart().getEnvelope().
addNamespaceDeclaration(Signature.NAMESPACE_PREFIX_DS,
Signature.NAMESPACE_URI_DS);
ackMessage.saveChanges();
}
return ackMessage;
}
/**
* Generates acknowledgement message from the given acknowledgement
* request message and the refToMessageId.
* Note that the acknowledgment message is not signed.
*
* @param ackRequestedMessage Acknowledgement request message.
* @param refToMessageId MessageId of the message to which the
* acknowledgement response should be referred.
*
* @return Acknowledgement message.
*
* @exception SOAPException
*/
public static EbxmlMessage generateAcknowledgment(
EbxmlMessage ackRequestedMessage) throws SOAPException {
return generateAcknowledgment(ackRequestedMessage,
ackRequestedMessage.getMessageId());
}
/**
* Generates response message from the given status request message and
* the status string [ebMSS 7.1.2].
*
* @param statusRequestMessage Status request message.
* @param status Current status of the message service
* handler.
*
* @return Status response message.
*
* @exception SOAPException
*/
public static EbxmlMessage generateStatusResponseMessage(
EbxmlMessage statusRequestMessage, String status, String timestamp)
throws SOAPException {
final EbxmlMessage statusResponseMessage = generateResponseMessage(
statusRequestMessage, Constants.ACTION_STATUS_RESPONSE);
statusResponseMessage.getMessageHeader().setRefToMessageId(
statusRequestMessage.getMessageId());
final String refToMessageId
= statusRequestMessage.getStatusRequest().getRefToMessageId();
if (status.equals(Constants.STATUS_UN_AUTHORIZED) ||
status.equals(Constants.STATUS_NOT_RECOGNIZED)) {
statusResponseMessage.addStatusResponse(refToMessageId, status);
}
else {
long time = Long.parseLong(timestamp);
Date date = new Date(time);
String utcTime = Utility.toUTCString(date);
statusResponseMessage.addStatusResponse(
refToMessageId, status, utcTime);
}
return statusResponseMessage;
}
/**
* Generates an error message containing the specfied error code
* [ebMSS 4.2.3.4.1].
*
* @param ebxmlMessage ebXML message to which error list should be
* attached.
* @param errorCode Error code of the message.
* @param severity Error severity, either ERROR or WARNING.
* @param description Human-readable description of the error message.
* @param location Source of the error.
*
* @return ebXML message containing error code.
*
* @exception SOAPException
*/
public static EbxmlMessage generateErrorMessage(EbxmlMessage ebxmlMessage,
String errorCode, String severity, String description,
String location) throws SOAPException {
final EbxmlMessage errorMessage = generateResponseMessage(
ebxmlMessage, Constants.ACTION_MESSAGE_ERROR);
errorMessage.getMessageHeader().
setRefToMessageId(ebxmlMessage.getMessageId());
errorMessage.addErrorList(errorCode, severity, description,
location);
errorMessage.saveChanges();
return errorMessage;
}
/**
* Generates pong message from the given ping message [ebMSS 8.2].
*
* @param pingMessage Incoming ping message.
*
* @return Pong message in response of the incoming ping message.
*
* @exception SOAPException
*/
public static EbxmlMessage generatePongMessage(EbxmlMessage pingMessage)
throws SOAPException {
final EbxmlMessage pongMessage = generateResponseMessage(
pingMessage, Constants.ACTION_PONG);
pongMessage.getMessageHeader().setRefToMessageId(
pingMessage.getMessageId());
pongMessage.saveChanges();
return pongMessage;
}
}
Index: Constants.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Constants.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Constants.java 11 Sep 2003 08:58:08 -0000 1.32
--- Constants.java 21 Nov 2003 02:00:04 -0000 1.33
***************
*** 294,297 ****
--- 294,335 ----
/**
+ * Service name reserved for services described in ebXML Message Service
+ * Specification [ebMSS 3.1.4].
+ */
+ public static final String SERVICE =
+ "urn:oasis:names:tc:ebxml-msg:service";
+
+ /**
+ * Acknowledgement action [ebMSS 6.3.2.7]
+ */
+ public static final String ACTION_ACKNOWLEDGMENT = "Acknowledgment";
+
+ /**
+ * Action for an ErrorList element to be included in an independent
+ * message [ebMSS 4.2.4.3]
+ */
+ public static final String ACTION_MESSAGE_ERROR = "MessageError";
+
+ /**
+ * Action for ping message [ebMSS 8.1]
+ */
+ public static final String ACTION_PING = "Ping";
+
+ /**
+ * Action for pong message [ebMSS 8.2]
+ */
+ public static final String ACTION_PONG = "Pong";
+
+ /**
+ * Action for status request message [ebMSS 7.1.1]
+ */
+ public static final String ACTION_STATUS_REQUEST = "StatusRequest";
+
+ /**
+ * Action for status response message [ebMSS 7.1.2]
+ */
+ public static final String ACTION_STATUS_RESPONSE = "StatusResponse";
+
+ /**
Path to access the classname of customized Hostname verifier for
the SSL connection
Index: MessageProcessor.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageProcessor.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** MessageProcessor.java 2 Jul 2003 07:02:51 -0000 1.51
--- MessageProcessor.java 21 Nov 2003 02:00:05 -0000 1.52
***************
*** 235,240 ****
ebxmlMessage.getErrorList() == null &&
ebxmlMessage.getStatusResponse() == null &&
! !(ebxmlMessage.getService().equals(MessageServiceHandler.SERVICE) &&
! ebxmlMessage.getAction().equals(MessageServiceHandler.ACTION_PONG));
messageSender = null;
boolean commError = false;
--- 235,240 ----
ebxmlMessage.getErrorList() == null &&
ebxmlMessage.getStatusResponse() == null &&
! !(ebxmlMessage.getService().equals(Constants.SERVICE) &&
! ebxmlMessage.getAction().equals(Constants.ACTION_PONG));
messageSender = null;
boolean commError = false;
***************
*** 608,618 ****
final String messageId = Utility.generateMessageId
(date, toPartyId, ebxmlMessage.getCpaId(),
! MessageServiceHandler.SERVICE,
! MessageServiceHandler.ACTION_STATUS_RESPONSE);
logger.debug("new message id: <" + messageId + ">");
positiveAckMessage.addMessageHeader(fromPartyId, toPartyId,
ebxmlMessage.getCpaId(), ebxmlMessage.getConversationId(),
! MessageServiceHandler.SERVICE, MessageServiceHandler.
! ACTION_STATUS_RESPONSE, messageId, timeStamp);
positiveAckMessage.getMessageHeader().
setRefToMessageId(ebxmlMessage.getMessageId());
--- 608,617 ----
final String messageId = Utility.generateMessageId
(date, toPartyId, ebxmlMessage.getCpaId(),
! Constants.SERVICE, Constants.ACTION_STATUS_RESPONSE);
logger.debug("new message id: <" + messageId + ">");
positiveAckMessage.addMessageHeader(fromPartyId, toPartyId,
ebxmlMessage.getCpaId(), ebxmlMessage.getConversationId(),
! Constants.SERVICE, Constants.ACTION_STATUS_RESPONSE,
! messageId, timeStamp);
positiveAckMessage.getMessageHeader().
setRefToMessageId(ebxmlMessage.getMessageId());
***************
*** 678,683 ****
errorMessage.addMessageHeader(toPartyId, toPartyType,
fromPartyId, fromPartyType, ebxmlMessage.getCpaId(),
! ebxmlMessage.getConversationId(), MessageServiceHandler.SERVICE,
! MessageServiceHandler.ACTION_MESSAGE_ERROR, messageId,
timeStamp).setRefToMessageId(ebxmlMessage.getMessageId());
errorMessage.addErrorList(errorCode, severity, description);
--- 677,682 ----
errorMessage.addMessageHeader(toPartyId, toPartyType,
fromPartyId, fromPartyType, ebxmlMessage.getCpaId(),
! ebxmlMessage.getConversationId(), Constants.SERVICE,
! Constants.ACTION_MESSAGE_ERROR, messageId,
timeStamp).setRefToMessageId(ebxmlMessage.getMessageId());
errorMessage.addErrorList(errorCode, severity, description);
Index: MessageServiceHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v
retrieving revision 1.177
retrieving revision 1.178
diff -C2 -d -r1.177 -r1.178
*** MessageServiceHandler.java 17 Nov 2003 02:09:29 -0000 1.177
--- MessageServiceHandler.java 21 Nov 2003 02:00:05 -0000 1.178
***************
*** 140,143 ****
--- 140,144 ----
* Service name reserved for services described in ebXML Message Service
* Specification [ebMSS 3.1.4].
+ @deprecated please use Constants.SERVICE
*/
public static final String SERVICE =
***************
*** 146,149 ****
--- 147,151 ----
/**
* Acknowledgement action [ebMSS 6.3.2.7]
+ * @deprecated please use Constants.ACTION_ACKNOWLEDGMENT
*/
public static final String ACTION_ACKNOWLEDGMENT = "Acknowledgment";
***************
*** 152,155 ****
--- 154,158 ----
* Action for an ErrorList element to be included in an independent
* message [ebMSS 4.2.4.3]
+ * @deprecated please use Constants.ACTION_MESSAGE_ERROR
*/
public static final String ACTION_MESSAGE_ERROR = "MessageError";
***************
*** 157,160 ****
--- 160,164 ----
/**
* Action for ping message [ebMSS 8.1]
+ * @deprecated please use Constants.ACTION_PING
*/
public static final String ACTION_PING = "Ping";
***************
*** 162,165 ****
--- 166,170 ----
/**
* Action for pong message [ebMSS 8.2]
+ * @deprecated please use Constants.ACTION_PONG
*/
public static final String ACTION_PONG = "Pong";
***************
*** 167,170 ****
--- 172,176 ----
/**
* Action for status request message [ebMSS 7.1.1]
+ * @deprecated please use Constants.ACTION_STATUS_REQUEST
*/
public static final String ACTION_STATUS_REQUEST = "StatusRequest";
***************
*** 172,175 ****
--- 178,182 ----
/**
* Action for status response message [ebMSS 7.1.2]
+ * @deprecated please use Constants.ACTION_STATUS_RESPONSE
*/
public static final String ACTION_STATUS_RESPONSE = "StatusResponse";
***************
*** 2356,2426 ****
}
- /**
- * Generate a simple response message containing required elements in
- * message header. They include:
- * <ul>
- * <li>From/PartyId [ebMSS 3.1.1]</li>
- * <li>To/PartyId [ebMSS 3.1.1]</li>
- * <li>CPAId [ebMSS 3.1.2].</li>
- * <li>ConversationId [ebMSS 3.1.3].</li>
- * <li>Service [ebMSS 3.1.4].</li>
- * <li>Action [ebMSS 3.1.5].</li>
- * <li>MessageId [ebMSS 3.1.6.1].</li>
- * <li>Timestamp [ebMSS 3.1.6.2].</li>
- * </ul>
- *
- * @param requestMessage Request message for which a response message
- * shall be generated.
- * @param action Name of the action.
- *
- * @return An {@link EbxmlMessage} that contains the fields mentioned
- * above.
- *
- * @exception MessageServiceHandlerException
- */
- private EbxmlMessage generateResponseMessage(EbxmlMessage requestMessage,
- String action)
- throws MessageServiceHandlerException {
-
- logger.debug("=> MessageServiceHandler.generateResponseMessage");
-
- final EbxmlMessage responseMessage;
- try {
- responseMessage = new EbxmlMessage();
- final MessageHeader.PartyId fromParty = (MessageHeader.PartyId)
- requestMessage.getToPartyIds().next();
- final String fromPartyId = fromParty.getId();
- final String fromPartyIdType = fromParty.getType();
- final MessageHeader.PartyId toParty = (MessageHeader.PartyId)
- requestMessage.getFromPartyIds().next();
- final String toPartyId = toParty.getId();
- final String toPartyIdType = toParty.getType();
- final Date date = new Date();
- final String timeStamp = Utility.toUTCString(date);
- final String messageId = Utility.generateMessageId(date, toPartyId,
- requestMessage.getCpaId(), SERVICE, action);
-
- logger.debug("new message id: <" + messageId + ">");
- responseMessage.addMessageHeader(fromPartyId, fromPartyIdType,
- toPartyId, toPartyIdType, requestMessage.getCpaId(),
- requestMessage.getConversationId(), SERVICE, action, messageId,
- timeStamp);
- }
- catch (SOAPException e) {
- String err = ErrorMessages.getMessage(
- ErrorMessages.ERR_SOAP_GENERAL_ERROR, e);
- logger.warn(err);
- throw new MessageServiceHandlerException(err);
- }
- catch (Exception e) {
- String err = ErrorMessages.getMessage(
- ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e);
- logger.error(err);
- throw new MessageServiceHandlerException(err);
- }
-
- logger.debug("<= MessageServiceHandler.generateResponseMessage");
- return responseMessage;
- }
/**
--- 2363,2366 ----
***************
*** 2541,2581 ****
try {
! final EbxmlMessage ackMessage = generateResponseMessage
! (ackRequestedMessage, ACTION_ACKNOWLEDGMENT);
!
! final MessageHeader messageHeader = ackMessage.getMessageHeader();
! messageHeader.setRefToMessageId(refToMessageId);
! logger.debug("refTo message id: <" + refToMessageId + ">");
! if (ackRequestedMessage.getDuplicateElimination()) {
! messageHeader.setDuplicateElimination();
! }
! // ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
! // ackRequestedMessage, mshUrl);
! Iterator toParties = ackRequestedMessage.getToPartyIds();
! String actor = ackRequestedMessage.getAckRequested().getActor();
! if (toParties.hasNext()) {
! MessageHeader.PartyId party =
! (MessageHeader.PartyId) toParties.next();
! ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
! ackRequestedMessage, party.getId(), party.getType());
! }
! else {
! ackMessage.addAcknowledgment(messageHeader.getTimestamp(),
! ackRequestedMessage, mshUrl);
! }
!
! Iterator signatures = ackRequestedMessage.getSignatures();
! if (signatures.hasNext()) {
! Acknowledgment ack = ackMessage.getAcknowledgment();
! for (Iterator i=((Signature) signatures.next()).
! getReferences() ; i.hasNext() ; ) {
! ack.addSignatureReference((SignatureReference) i.next());
! }
! ackMessage.getSOAPMessage().getSOAPPart().getEnvelope().
! addNamespaceDeclaration(Signature.NAMESPACE_PREFIX_DS,
! Signature.NAMESPACE_URI_DS);
! ackMessage.saveChanges();
! }
!
if (ackRequestedMessage.getAckRequested().getSigned()) {
logger.debug("sign the Ack");
--- 2481,2487 ----
try {
! EbxmlMessage ackMessage
! = SignalMessageGenerator.generateAcknowledgment(
! ackRequestedMessage, refToMessageId);
if (ackRequestedMessage.getAckRequested().getSigned()) {
logger.debug("sign the Ack");
***************
*** 2606,2612 ****
throw new MessageServiceHandlerException(e.getMessage());
}
- catch (MessageServiceHandlerException e) {
- throw e;
- }
catch (Exception e) {
String err = ErrorMessages.getMessage(
--- 2512,2515 ----
***************
*** 2634,2656 ****
logger.debug("=> MessageServiceHandler.generateStatusResponseMessage");
!
! final EbxmlMessage statusResponseMessage = generateResponseMessage
! (statusRequestMessage, ACTION_STATUS_RESPONSE);
try {
! statusResponseMessage.getMessageHeader().
! setRefToMessageId(statusRequestMessage.getMessageId());
! final String refToMessageId = statusRequestMessage.
! getStatusRequest().getRefToMessageId();
! if (status.equals(Constants.STATUS_UN_AUTHORIZED) ||
! status.equals(Constants.STATUS_NOT_RECOGNIZED)) {
! statusResponseMessage.addStatusResponse(refToMessageId, status);
! }
! else {
! long time = Long.parseLong(timestamp);
! Date date = new Date(time);
! String utcTime = Utility.toUTCString(date);
! statusResponseMessage.
! addStatusResponse(refToMessageId, status, utcTime);
! }
}
catch (SOAPException e) {
--- 2537,2545 ----
logger.debug("=> MessageServiceHandler.generateStatusResponseMessage");
! EbxmlMessage statusResponseMessage = null;
try {
! statusResponseMessage
! = SignalMessageGenerator.generateStatusResponseMessage(
! statusRequestMessage, status, timestamp);
}
catch (SOAPException e) {
***************
*** 2719,2731 ****
logger.debug("=> MessageServiceHandler.generateErrorMessage");
!
! final EbxmlMessage errorMessage = generateResponseMessage
! (ebxmlMessage, ACTION_MESSAGE_ERROR);
try {
! errorMessage.getMessageHeader().
! setRefToMessageId(ebxmlMessage.getMessageId());
! errorMessage.addErrorList(errorCode, severity, description,
! location);
! errorMessage.saveChanges();
}
catch (SOAPException e) {
--- 2608,2615 ----
logger.debug("=> MessageServiceHandler.generateErrorMessage");
! EbxmlMessage errorMessage = null;
try {
! errorMessage = SignalMessageGenerator.generateErrorMessage(
! ebxmlMessage, errorCode, severity, description, location);
}
catch (SOAPException e) {
***************
*** 2760,2769 ****
logger.debug("=> MessageServiceHandler.generatePongMessage");
! final EbxmlMessage pongMessage =
! generateResponseMessage(pingMessage, ACTION_PONG);
try {
! pongMessage.getMessageHeader().
! setRefToMessageId(pingMessage.getMessageId());
! pongMessage.saveChanges();
}
catch (SOAPException e) {
--- 2644,2651 ----
logger.debug("=> MessageServiceHandler.generatePongMessage");
! EbxmlMessage pongMessage = null;
try {
! pongMessage = SignalMessageGenerator.generatePongMessage(
! pingMessage);
}
catch (SOAPException e) {
***************
*** 4464,4471 ****
final String service = ebxmlMessage.getService();
final String action = ebxmlMessage.getAction();
! final boolean isPing = service.equals(SERVICE) &&
! action.equals(ACTION_PING);
! final boolean isPong = service.equals(SERVICE) &&
! action.equals(ACTION_PONG);
final boolean isError = (ebxmlMessage.getErrorList() != null);
--- 4346,4353 ----
final String service = ebxmlMessage.getService();
final String action = ebxmlMessage.getAction();
! final boolean isPing = service.equals(Constants.SERVICE) &&
! action.equals(Constants.ACTION_PING);
! final boolean isPong = service.equals(Constants.SERVICE) &&
! action.equals(Constants.ACTION_PONG);
final boolean isError = (ebxmlMessage.getErrorList() != null);
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging
In directory sc8-pr-cvs1:/tmp/cvs-serv32207/src/hk/hku/cecid/phoenix/message/packaging
Modified Files:
Tag: b0931
Acknowledgment.java EbxmlMessage.java HeaderElement.java
Log Message:
add function to get the actor value on HeaderElement.
Set the acknowledgment's actor value to be the same as the AckRequest's
actor value. Using urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH
as default.
Index: Acknowledgment.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Acknowledgment.java,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -C2 -d -r1.6.2.2 -r1.6.2.3
*** Acknowledgment.java 15 Apr 2003 01:55:35 -0000 1.6.2.2
--- Acknowledgment.java 18 Nov 2003 01:57:12 -0000 1.6.2.3
***************
*** 124,127 ****
--- 124,128 ----
this.timestamp = timestamp;
this.refToMessageId = refToMessage.getMessageId();
+ setActor(ACTOR_TO_PARTY_MSH_URN);
addChildElement(MessageHeader.ELEMENT_TIMESTAMP, timestamp);
Index: EbxmlMessage.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v
retrieving revision 1.24.2.7
retrieving revision 1.24.2.8
diff -C2 -d -r1.24.2.7 -r1.24.2.8
*** EbxmlMessage.java 26 Jul 2003 15:17:33 -0000 1.24.2.7
--- EbxmlMessage.java 18 Nov 2003 01:57:12 -0000 1.24.2.8
***************
*** 610,613 ****
--- 610,617 ----
new Acknowledgment(soapEnvelope, timestamp, refToMessage,
fromPartyId, fromPartyIdType);
+ String actor = refToMessage.getAckRequested().getActor();
+ if (actor != null) {
+ acknowledgment.setActor(actor);
+ }
headerContainer.addExtensionElement(acknowledgment);
saveChanges();
Index: HeaderElement.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/HeaderElement.java,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.3
diff -C2 -d -r1.3.4.2 -r1.3.4.3
*** HeaderElement.java 18 Jun 2003 09:18:50 -0000 1.3.4.2
--- HeaderElement.java 18 Nov 2003 01:57:12 -0000 1.3.4.3
***************
*** 127,129 ****
--- 127,133 ----
}
}
+
+ public String getActor() {
+ return actor;
+ }
}
|
|
From: <bob...@us...> - 2003-11-17 02:10:26
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv23918/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
MessageServiceHandler.java
Log Message:
Make the actor of acknowledgment object changable.
Set the acknowledgment actor to the value on AckRequested,
or use default.
Fix a Http.java bug which wrongly set the value of first MIME Header of
Sync Reply to be the header field.
Index: MessageServiceHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v
retrieving revision 1.176
retrieving revision 1.177
diff -C2 -d -r1.176 -r1.177
*** MessageServiceHandler.java 4 Nov 2003 07:00:27 -0000 1.176
--- MessageServiceHandler.java 17 Nov 2003 02:09:29 -0000 1.177
***************
*** 2553,2556 ****
--- 2553,2557 ----
// ackRequestedMessage, mshUrl);
Iterator toParties = ackRequestedMessage.getToPartyIds();
+ String actor = ackRequestedMessage.getAckRequested().getActor();
if (toParties.hasNext()) {
MessageHeader.PartyId party =
|
|
From: <bob...@us...> - 2003-11-17 02:10:26
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport
In directory sc8-pr-cvs1:/tmp/cvs-serv23918/src/hk/hku/cecid/phoenix/message/transport
Modified Files:
Http.java
Log Message:
Make the actor of acknowledgment object changable.
Set the acknowledgment actor to the value on AckRequested,
or use default.
Fix a Http.java bug which wrongly set the value of first MIME Header of
Sync Reply to be the header field.
Index: Http.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Http.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Http.java 22 Sep 2003 08:04:42 -0000 1.9
--- Http.java 17 Nov 2003 02:09:33 -0000 1.10
***************
*** 466,470 ****
MimeHeaders mimeHeaders = new MimeHeaders();
String key = connection.getHeaderFieldKey(1);
! String value = connection.getHeaderFieldKey(1);
for (int i=2 ; key != null ; i++) {
StringTokenizer values = new StringTokenizer(value, ",");
--- 466,470 ----
MimeHeaders mimeHeaders = new MimeHeaders();
String key = connection.getHeaderFieldKey(1);
! String value = connection.getHeaderField(1);
for (int i=2 ; key != null ; i++) {
StringTokenizer values = new StringTokenizer(value, ",");
|
|
From: <bob...@us...> - 2003-11-17 02:10:26
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging
In directory sc8-pr-cvs1:/tmp/cvs-serv23918/src/hk/hku/cecid/phoenix/message/packaging
Modified Files:
Acknowledgment.java EbxmlMessage.java HeaderElement.java
Log Message:
Make the actor of acknowledgment object changable.
Set the acknowledgment actor to the value on AckRequested,
or use default.
Fix a Http.java bug which wrongly set the value of first MIME Header of
Sync Reply to be the header field.
Index: Acknowledgment.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/Acknowledgment.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Acknowledgment.java 15 Apr 2003 02:05:39 -0000 1.8
--- Acknowledgment.java 17 Nov 2003 02:09:33 -0000 1.9
***************
*** 124,128 ****
this.timestamp = timestamp;
this.refToMessageId = refToMessage.getMessageId();
!
addChildElement(MessageHeader.ELEMENT_TIMESTAMP, timestamp);
addChildElement(MessageHeader.ELEMENT_REF_TO_MESSAGE_ID,
--- 124,128 ----
this.timestamp = timestamp;
this.refToMessageId = refToMessage.getMessageId();
! setActor(ACTOR_TO_PARTY_MSH_URN);
addChildElement(MessageHeader.ELEMENT_TIMESTAMP, timestamp);
addChildElement(MessageHeader.ELEMENT_REF_TO_MESSAGE_ID,
Index: EbxmlMessage.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** EbxmlMessage.java 20 Aug 2003 08:02:09 -0000 1.36
--- EbxmlMessage.java 17 Nov 2003 02:09:33 -0000 1.37
***************
*** 656,659 ****
--- 656,663 ----
new Acknowledgment(soapEnvelope, timestamp, refToMessage,
fromPartyId, fromPartyIdType);
+ String actor = refToMessage.getAckRequested().getActor();
+ if (actor != null) {
+ acknowledgment.setActor(actor);
+ }
headerContainer.addExtensionElement(acknowledgment);
saveChanges();
Index: HeaderElement.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/HeaderElement.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** HeaderElement.java 16 Jul 2003 08:54:10 -0000 1.7
--- HeaderElement.java 17 Nov 2003 02:09:33 -0000 1.8
***************
*** 129,131 ****
--- 129,135 ----
}
}
+
+ public String getActor() {
+ return actor;
+ }
}
|