From: Hassan Schroeder Date: 2010-02-13T02:45:07+09:00 Subject: Re: how to detect used protocol (SOAP, JSON, XML etc.) On Fri, Feb 12, 2010 at 2:22 AM, jeljer te Wies wrote: > I am building an ESB (Enterprise Service Bus) for a Content Management > System. > > The esb (as you probably know) should be able to handle multiple > protocols (JSON, XML, SOAP). > So it has a tcp socket and it gets a "request". > > The problem is that I can't figure out how to check what protocol is > used. If all these "protocols" are being delivered over HTTP, you can look at the "Accept" header. Read RFC2616 for details... HTH, -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com twitter: @hassan