Package org.apache.tuscany.sca.binding.jsonrpc.protocol

Examples of org.apache.tuscany.sca.binding.jsonrpc.protocol.JsonRpcRequest


                if (args instanceof Object[]) {
                    params = (Object[])args;
                }

                JsonRpcRequest req = null;
                if (JSONRPCBinding.VERSION_20.equals(((JSONRPCBinding)endpointReference.getBinding()).getVersion())) {
                    req = new JsonRpc20Request(requestId, msg.getOperation().getName(), params);
                } else {
                    req = new JsonRpc10Request(requestId, msg.getOperation().getName(), params);
                }
                final JsonRpcRequest json = req;

                // Create content producer so that we can stream the json result out
                ContentProducer cp = new ContentProducer() {
                    public void writeTo(OutputStream outstream) throws IOException {
                        // mapper.writeValue(outstream, req.toJSONObject().toString());
                        try {
                            json.write(outstream);
                        } catch (Exception e) {
                            throw new IOException(e);
                        }
                    }
                };
View Full Code Here


                if (args instanceof Object[]) {
                    params = (Object[])args;
                }

                JsonRpcRequest req = null;
                if (JSONRPCBinding.VERSION_20.equals(((JSONRPCBinding)endpointReference.getBinding()).getVersion())) {
                    req = new JsonRpc20Request(requestId, msg.getOperation().getName(), params);
                } else {
                    req = new JsonRpc10Request(requestId, msg.getOperation().getName(), params);
                }
                final JsonRpcRequest json = req;

                // Create content producer so that we can stream the json result out
                ContentProducer cp = new ContentProducer() {
                    public void writeTo(OutputStream outstream) throws IOException {
                        // mapper.writeValue(outstream, req.toJSONObject().toString());
                        try {
                            json.write(outstream);
                        } catch (Exception e) {
                            throw new IOException(e);
                        }
                    }
                };
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.jsonrpc.protocol.JsonRpcRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.