Package org.apache.tuscany.sca.binding.http

Examples of org.apache.tuscany.sca.binding.http.HTTPBindingContext


        this.next = next;
    }

    public Message invoke(Message msg) {
       
        HTTPBindingContext bindingContext = msg.getBindingContext();
        if ("smd".equals(bindingContext.getHttpRequest().getQueryString())) {
            return getNext().invoke(msg);
        }
       
        JSONObject jsonReq = null;
        String method = null;
View Full Code Here


        this.next = next;
       
    }

    public Message invoke(Message msg) {
        HTTPBindingContext bindingContext = msg.getBindingContext();
        Message returnMessage = null;
       
        if ("smd".equals(bindingContext.getHttpRequest().getQueryString())) {
            returnMessage = handleSMDInvocation(msg);
        } else {
            returnMessage = handleJSONRPCInvocation(msg);
        }
       
View Full Code Here

   
    /**
     * handles requests for the SMD descriptor for a service
     */
    private Message handleSMDInvocation(Message msg) {
        HTTPBindingContext bindingContext = msg.getBindingContext();
       
        String serviceUrl = bindingContext.getHttpRequest().getRequestURL().toString();
        JavaInterface interfaze = (JavaInterface) serviceContract.getInterface();
        String smd = JavaToSmd.interfaceToSmd(interfaze.getJavaClass(), serviceUrl);
       
        Message smdResponseMessage = messageFactory.createMessage();
        smdResponseMessage.setBody(smd);
View Full Code Here

        int ret;
        while ((ret = in.read(buf, 0, 4096)) != -1) {
            data.write(buf, 0, ret);
        }
       
        HTTPBindingContext bindingContext = new HTTPBindingContext();
        bindingContext.setHttpRequest(request);
        bindingContext.setHttpResponse(response);

        // Dispatch the service interaction to the service invoker
        Message requestMessage = messageFactory.createMessage();
        requestMessage.setBindingContext(bindingContext);
        requestMessage.setBody(new Object[]{data});
View Full Code Here

        this.next = next;
       
    }

    public Message invoke(Message msg) {
        HTTPBindingContext bindingContext = msg.getBindingContext();
        Message returnMessage = null;
       
        if ("smd".equals(bindingContext.getHttpRequest().getQueryString())) {
            returnMessage = handleSMDInvocation(msg);
        } else {
            returnMessage = handleJSONRPCInvocation(msg);
        }
       
View Full Code Here

   
    /**
     * handles requests for the SMD descriptor for a service
     */
    private Message handleSMDInvocation(Message msg) {
        HTTPBindingContext bindingContext = msg.getBindingContext();
       
        String serviceUrl = bindingContext.getHttpRequest().getRequestURL().toString();
        JavaInterface interfaze = (JavaInterface) serviceContract.getInterface();
        String smd = JavaToSmd.interfaceToSmd(interfaze.getJavaClass(), serviceUrl);
       
        Message smdResponseMessage = messageFactory.createMessage();
        smdResponseMessage.setBody(smd);
View Full Code Here

        this.next = next;
    }

    public Message invoke(Message msg) {
       
        HTTPBindingContext bindingContext = msg.getBindingContext();
        if ("smd".equals(bindingContext.getHttpRequest().getQueryString())) {
            return getNext().invoke(msg);
        }
       
        JSONObject jsonReq = null;
        String method = null;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.http.HTTPBindingContext

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.