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'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?

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? The downside to that, of course, is you'd probably end up having to more or less implement a Jabber server in Cocoon...

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...]

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? 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 :-)


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]

Reply via email to