First of all ParamConverters look very nice but don't help my cause.
The view is used to create the response but the problem is at the
request. This is how it should work:

1. HTTP client sends "json/application" POST request with this body
data: {"jsonrpc": "2.0", "method": "calculator.subtract", "params":
[42, 23], "id": 1}
2. The HttpKernel asks the resolver to return a controller and
arguments.
3. "ServiceResolver::getController" returns "HelloBundle\Service
\Calculator::substractAction" method.
4. "ServiceResolver::getArguments" returns the parameters 42 and 23
(or parameter object? parameters can be named in some transport
protocols such as JSON-RPC)
5. The service controller method "HelloBundle\Service
\Calculator::substractAction" returns the response object (possibly
helped by Twig or a JSON-RPC response builder)

The problem here is the resolver. How can I swap it for my own
implementation?

On Dec 27, 5:23 pm, Lukas Kahwe Smith <[email protected]> wrote:
> On 27.12.2010, at 16:44, Martijn wrote:
>
> > Hi,
>
> > I am building a service controller with helper functions for
> > webservices. Now I need to write a ServiceResolver class implementing
> > the ControllerResolverInterface to do the resolving for JSON-RPC, XML-
> > RPC or whatever I want to support (I want to support multiple
> > protocols). But how do I implement that? I have looked in the
> > FrameworkExtension but this class won't allow me to overwrite the
> > "controller_resolver" service. Is a webservice bundle a good addition
> > to Symfony2 and can anybody point me in the right direction?
>
> What exactly are you trying to achieve?
> Seems like the paramconverter [1] plus the view layer [2] could do the trick 
> for you?
>
> regards,
> Lukas Kahwe Smith
> [email protected]
>
> [1]http://blog.bearwoods.dk/symfony2-paramconverters
> [2]https://github.com/fabpot/symfony/pull/200

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to