Package org.apache.axis2.client

Examples of org.apache.axis2.client.Call.invokeBlocking()


            call.setClientOptions(options);

            String axisOp = request.getSOAPBody().getFirstChild().getNodeName();
            NodeImpl bodyContentNode = (NodeImpl)request.getSOAPBody().getFirstChild();
            OMElement bodyContent = (OMElement)bodyContentNode.getOMNode();
            OMElement result = call.invokeBlocking(axisOp, bodyContent);
            org.apache.axis2.soap.SOAPEnvelope responseEnv = (org.apache.axis2.soap.SOAPEnvelope) ((OMElement)result.getParent()).getParent();
            SOAPEnvelopeImpl response = new SOAPEnvelopeImpl(responseEnv);
           
            SOAPMessageImpl sMsg = new SOAPMessageImpl(response);
            extractAttachmentNodes(responseEnv, sMsg);
View Full Code Here


            options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
            options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
            options.setProperty(HTTPConstants.HTTP_CONTENT_TYPE, "application/x-www-form-urlencoded");

            //Blocking invocation
            OMElement result = call.invokeBlocking("echo", websearch);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
            writer.flush();
View Full Code Here

                false);
        options.setAction(operationName.getLocalPart());

        call.setClientOptions(options);

        OMElement result = call.invokeBlocking(operationName.getLocalPart(),
                payload);
        assertNotNull(result);
        OMElement person = (OMElement) result.getFirstOMChild();
        assertEquals(person.getLocalName(), "person");
View Full Code Here

        options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
        options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET, Constants.VALUE_TRUE);

        //if post is through GET of HTTP
        OMElement response = call.invokeBlocking("webSearch", data);
        response.serialize(System.out);
    }
}
View Full Code Here

        Options options = new Options();
        call.setClientOptions(options);
        options.setTo(new EndpointReference(url.toString()));
        try {
            responseElement =
                    call.invokeBlocking("doGoogleSpellingSugg",
                            requestElement);
        } catch (AxisFault axisFault) {
            observer.updateError(axisFault.getMessage());
        }
View Full Code Here

        // Ready to go - set the To address and make the call
        Options options = new Options();
        call.setClientOptions(options);
        options.setTo(new EndpointReference("local://services/testService"));
       
        SOAPEnvelope respEnv = call.invokeBlocking("echoArray", env);
        assertNotNull("No response envelope!", respEnv);

        // Got a response envelope, let's deserialize it back to Java
        DeserializationContext dserContext = new DeserializationContext();
        values = dserContext.deserializeRPCElement(method, respEnv.getBody().getFirstElement());
View Full Code Here

            options.setTo(targetEPR);
            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(false);

            //Blocking invocation
            OMElement result = call.invokeBlocking("echo",
                    payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
View Full Code Here

            call.engageModule(new QName(Constants.MODULE_ADDRESSING));
            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);

            //Blocking Invocation
            OMElement result = call.invokeBlocking("echo",
                    payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
View Full Code Here

        call.setClientOptions(options);
        options.setTo(new EndpointReference(toEpr));
        options.setListenerTransportProtocol(Constants.TRANSPORT_TCP);
        options.setUseSeparateListener(false);

        OMElement result = call.invokeBlocking("echo", getPayload());

        try {
            XMLStreamWriter writer = XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(System.out);
            result.serialize(writer);
View Full Code Here

        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_FALSE);
        options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
        options.setUseSeparateListener(false);
        call.setClientOptions(options);

        return call.invokeBlocking(operationName
                .getLocalPart(),
                payload);
    }

    public void setTargetEPR(String targetEPR) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.