This does clarify things a bit. Thanks! If I knew the codebase better I'd volunteer to help implement proxying on the base URL...
-L -----Original Message----- From: "Ruwan Linton" <[EMAIL PROTECTED]> Sent: Friday, June 27, 2008 10:16pm To: [email protected], [EMAIL PROTECTED] Subject: Re: Synapse as HTTP Proxy? minor correction please change that URL to the following :-) sorry for the inconvenience, http://localhost:8280/soap/__SynapseService<http://localhost:8280/soap/synapse> http://localhost:8280/soap/__SynapseService/mediate<http://localhost:8280/soap/synapse> Thanks, Ruwan On 6/28/08, Ruwan Linton <[EMAIL PROTECTED]> wrote: > > Hi Leander, > > Well, an interesting idea.... See my comments in-line; > > On 6/28/08, [EMAIL PROTECTED] < > [EMAIL PROTECTED]> wrote: >> >> Here's an obscure corner case. Is it possible to use Synapse in the role >> of an HTTP proxy, or at least have it look like one to clients? What I'm >> going for is to have Synapse get requests for fully qualified urls (ie, 'GET >> http://www.example.com/stuff HTTP/1.1') and do it's normal mediation >> shtick on them. > > > For the moment it is possible with proxy services. > > It seems like this is doable with SOAP/POX requests, as Synapse seems to >> expect HTTP proxy-style POST-with-fully-qualified-url requests when not >> serving a Synapse <proxy> service. > > > Correct! > > However, when doing the same with a GET request, it of course responds with >> a Moved Permanently redirect to the services index page because it thinks >> some poor misdirected user is aiming a web browser at the wrong place. I've >> looked at the ServerWorker class that handles this, and while hacking out >> the redirect sending code seems pretty straightforward, the result is then >> that GET requests of this type just hang (GETting something served by a >> <proxy> service still works). > > > Well, still this is possible I mean getting the proxy working for GET > requests without a Synapse <proxy>. You get this behavior because you are > trying to use the root URL, please try the following URLs, > > http://localhost:8280/soap/synapse > http://localhost:8280/soap/synapse/mediate > > At the same time I think we should fix this to serve on the base URL, > because we do serve for requests over a POST for the base URL. I think this > can be easily fixed. Let me wait and see what you and others on the > community think about this... > > Is it possible to make Synapse work in this way, or is this just >> excessively an abuse of what synapse is supposed to do? > > > No, this is not at all an abuse. Well, synapse is designed to do these > kinds of stuff. Please try the above proposed URLs in your GET request, at > the same time I will get the fix to the GET request processing so that you > can do a GET on the base URL as well. > > Thanks, > Ruwan > > > Thanks, >> >> -Leander >> >> > > > -- > Ruwan Linton > http://wso2.org - "Oxygenating the Web Services Platform" > http://ruwansblog.blogspot.com/ -- Ruwan Linton http://wso2.org - "Oxygenating the Web Services Platform" http://ruwansblog.blogspot.com/
