users@glassfish.java.net

Re: Why do I need GlassFish running to get standalone JMS client

From: <forums_at_java.net>
Date: Sat, 23 Jul 2011 18:44:21 -0500 (CDT)

Thanks this really helped.  Now I have to extract the body of a message, and
send it to the database.  This code should extract the body of a message,
but i still need to send it to the database.

var content;
var MessageURI = GetFirstSelectedMessage();
var MsgService = messenger.messageServiceFromURI(MessageURI);
var MsgStream =
Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance();
var MsgStrem_Inputstream =
MsgStream.QueryInterface(Components.interfaces.nsIInputStream);
var ScriptInput =
Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance();
var ScriptInputStream = ScriptInput
.QueryInterface(Components.interfaces.nsIScriptableInputStream);
ScriptInputStream .init(MsgStream);
try
{
MsgService .streamMessage(MessageURI,MsgStream, msgWindow, null, false,
null);
}
catch (ex)
{
return;
}
ScriptInputStream .available();
while (ScriptInputStream .available())
{
content = content + ScriptInputStream .read(512);
}
alert(content)


--
[Message sent by forum member 'ajmarie27']
View Post: http://forums.java.net/node/664264