I have finished implementing wire format and operation selector into
our http binding. While all the original HTTP binding features are
preserved and you can continue to use them in your apps, you now have
the ability to change the wire format and operation selector that
would follow the JSON-RPC protocol rules.  See example below :

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
        targetNamespace="http://jsonrpc";
        xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
        xmlns:jsonrpc="http://jsonrpc";
        name="JSONRPCBinding">

    <service name="EchoService" promote="EchoComponent">
        <interface.java interface="echo.Echo"/>
        <tuscany:binding.http uri="http://localhost:8085/EchoService";>
           <tuscany:wireFormat.jsonrpc/>
           <tuscany:operationSelector.jsonrpc/>
        </tuscany:binding.http>
    </service>

    <component name="EchoComponent">
        <implementation.java class="echo.EchoComponentImpl"/>
    </component>
</composite>

Note that these wire formats and operation selectors are plugable, and
we can plug new types such as (json, xml, etc... )

Once we feel comfortable with this approach, we could probably
simplify the JSON-RPC binding to produce a HTTP binding model
configured to use JSON-RPC wire format and operation selector.

Thoughts ?

-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Reply via email to