I just took a look at Wildfire. It seems that that is more what I was looking for:
- It handles Jabber
- It stores its data in a database

Now I only have to find out how to create messages from (in my case) mySQL procedures.


Yves Vindevogel wrote:
Hi Andrew,

Thanks for your very interesting mail.
My replies are in it.

Regards,
Yves

Andrew Stevens wrote:
From: Yves Vindevogel <[EMAIL PROTECTED]>
Date: Thu, 08 Jun 2006 19:45:51 +0200

Hi,

I would like to have some more logging of everything that is send to my Cocoon server.

I have Jetty / Cocoon listening on port 8888.
I can see it logs a page that is being asked.

However, (and I'm trying to do something strange) I'm trying to make a Jabber client connect to it.
I set my jabber client to connect to the server on port 8888.

Sounds interesting, if a bit weird :-)
I know :-))
I'm guessing a bit here as I've not used it myself, but I thought Jabber uses XMPP, not HTTP? According to RFC3920 [1], "The Extensible Messaging and Presence Protocol (XMPP) is an open Extensible Markup Language [XML] protocol for near-real-time messaging, presence, and request-response services."
...
"Although there is no necessary coupling of an XML stream to a [TCP] connection (e.g., two entities could connect to each other via another mechanism such as polling over [HTTP]), this specification defines a binding of XMPP to TCP only." so I'm not surprised just pointing your Jabber client at a HTTP server doesn't work. On the other hand, since it mentions request-response services, I guess it might be possible to plug Cocoon into a Jabber server by providing another Environment implementation that uses its request & response types rather than HttpRequest & HttpResponse?

I was using Exodus on Windows, Fire on OSX and some code written in Realbasic to test this. The only thing I could change was the port and the server. So I changed that to my running Jetty/Cocoon to see what happened. Your explanation is correct, it uses a different protocol.
Alternatively, I noticed the Jabber site has an enhancement proposal for "HTTP Binding" [2]. Although this seems more concerned with HTTP clients connecting to an XMPP server, it did contain a link to one on "Jabber HTTP Polling" [3] that has been passed to active status. This uses periodic POST requests with content type text/xml, so I guess it may be possible to connect those to Cocoon. How you configure your client to use this type of connection, though, I've no idea. RTFM?
I will write the code myself if needed. I have a class (in Realbasic) that is a wrapper round the tcp socket that can communicate. I've got that already.
The downside to that, of course, is you'd probably end up having to more or less implement a Jabber server in Cocoon...

See my detailed project description below. I'm not interested in IM, as such. I'm just interested in the transport mechanism.
Here's another thought. Wildfire [4] is an Open Source Java-based XMPP server that can be deployed as a WAR, that supports plug-ins. Perhaps you could write a plug-in for it that passes various messages through to a Cocoon instance running in another context on the same server? Just (!) get a RequestDispatcher to the Cocoon servlet, create your own HttpRequest implementation class (filled with the contents of the message) and supply a HttpResponse that captures the output to a string buffer. [random thought - it's too late now, but perhaps that would have made an interesting GSoC project...]

I'll look into that. Wildfire is unknown to me. So is Java, I'm afraid. I can write some Java in xsp-logic and some Java script, but I've never written a complete Java project. I've started with Basic back on the Commodore 64 and always stayed with it through GW-Basic, Quick Basic, Visual Basic and now Realbasic. I use Cocoon for webdevelopment because I like XML a lot. But anyway, I'll take a look at it and browse some sources in Cocoon to see whether I can "learn" something.
Of course, it does not connect, but I can't see anything in the logs about what it's sending, ....

If it's not seeing a valid HTTP request, that's not entirely surprising.

Is something like this possible (log that jabber is looking for contact, that's all) I don't want to create a jabber server with cocoon, just see what they send.

So why not just point it to a Jabber server, then use a packet sniffer like Ethereal [5] to eavesdrop on the normal traffic between the two?
Because I had a running Cocoon and thought I'd see more there. I know pretty much what they are sending to each other, but I wanted to see how Cocoon got it ...
So long as it's configured not to use a TLS-encrypted connection there's no reason that shouldn't work, and it'd be a lot easier than trying to use Cocoon to do the same job :-)


Ok, let my explain what the project is all about. I need a system (app) that corresponds with other users that are using the same app. They send messages to each other and to a central point. The messages to the central server are like "log in", "send my collection", "look for x in other collections" ... The messages to the users individually are like "i want to buy x from you for y$", "i agree to sell to you", .... All messages, including the ones between the users must be recorded (in a database). One communication is always 3 or 4 messages: eg. 1) I want to buy x from you for y $ 2) I agree to sell x to you for y 3) I confirm that you responded positively to my demand and were closing a deal on x for y Other example: 1) please send my the collection 2) here's my collection of x items 3) thank you for sending me your collection of x items (then no response if the check is ok, but if for instance the answer is 3) thank you for sending me your collection of x-1 items then you have 4) no, sorry, I send you x items lets recommunicate.) This is all a standard system to communicate with Xml between computers (think they call it QOS)

So, the above thing looks like jabber ... Jabber uses XML to communicate, it has users and it has rooms. So, this way I could have implemented my transport mechanism very easily ...

However, Jabber does not talk to a database (I think) to get data. Jabber would not know how to respond to "look in collection for x". Therefore, I need to link a backend. I was thinking about Cocoon off course ...
Andrew.

[1] http://www.ietf.org/rfc/rfc3920.txt
[2] http://www.jabber.org/jeps/jep-0124.html
[3] http://www.jabber.org/jeps/jep-0025.html
[4] http://www.jivesoftware.org/wildfire/
[5] http://www.ethereal.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to