Also, this is what the var message contained: String jabMessage = "<html><body><p style='font-size:large'>OMG, i'm </span><span style='color:green'>green</span> with <em>envy</em>!</p></body></html>";
Steven Cunningham Database Management Group Liberty Mutual -----Original Message----- From: Cunningham, Steven Sent: Friday, August 15, 2003 8:52 AM To: [EMAIL PROTECTED] Subject: RE: [JDEV] Formatting pt. 2 - JAJC Ok, I *think* I'm getting close, but I get the SendMessageFailedException. SendMessageFailedException.getLocalizedMessage() returns this: The element "message" could not be added as a child of "message": The element already has an existing parent (the document root) --Code-- JabberChatMessage msg = new JabberChatMessage(JabberChatMessage.TYPE_CHAT); msg.setTo(jabTo); msg.setHTMLBody(message); msg.setSynchronized(false); jabberSession.sendMessage(msg); Steven Cunningham Database Management Group Liberty Mutual -----Original Message----- From: Chris Chen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 4:00 PM To: Cunningham, Steven Subject: Re: [JDEV] Formatting pt. 2 - JAJC Hi, That is not how you utilize the jabber chat service's sendPrivateMessage().. You should read the javadocs for the method. JabberChatService.sendPrivateMessage() accepts a recipient JID and the "body" of the message, NOT the XML representation of the message. As I mentioned before, please read my previous post on how to send a chat message that contains HTML. I replied to your message yesterday. Thanks, Chris ----- Original Message ----- From: "Cunningham, Steven" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2003 12:35 PM Subject: RE: [JDEV] Formatting pt. 2 - JAJC > Can someone tell me if I'm doing this wrong? > > -- Java Code -- > > String jabMessage = "<message><body>OMG, i'm green with > envy!</body><html xmlns='http://jabber.org/protocol/xhtml-im'><body><p > style='font-size:large'>OMG, i'm <span > style='color:green'>green</span> with > <em>envy</em>!</p></body></html></message>"; > > JabberChatService chat = jabberSession.getChatService(); > > chat.sendPrivateMessage(to, message); > > -- End Java Code -- > > Steven Cunningham > Database Management Group > Liberty Mutual > > > -----Original Message----- > From: David 'TheRaven' Chisnall [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 13, 2003 11:41 AM > To: [EMAIL PROTECTED] > Subject: Re: [JDEV] Formatting pt. 2 - JAJC > > > JAJC does support some form of XHTML, although it claims to be <html > xmlns="http://www.w3.org/TR/xhtml-basic">, rather than the recommended > <html xmlns="http://jabber.org/protocol/xhtml-im"> from JEP-71, so I > don't know how compatible it is with other implementations. > > Cunningham, Steven wrote: > > > Formatting pt. 2 - JAJC > > > > I got responses on formatting messages with the Exodous client, but > > it seems that it's not possible. > > > > Now I'd like to ask how/if it's possible to do so with the JAJC > > client? > > > > * Steven Cunningham * > > Database Management Group > > Liberty Mutual > > > > > _______________________________________________ > jdev mailing list > [EMAIL PROTECTED] > http://mailman.jabber.org/listinfo/jdev > _______________________________________________ > jdev mailing list > [EMAIL PROTECTED] > http://mailman.jabber.org/listinfo/jdev > Steven Cunningham Database Management Group Liberty Mutual _______________________________________________ jdev mailing list [EMAIL PROTECTED] http://mailman.jabber.org/listinfo/jdev