Package org.apache.axis2.client

Examples of org.apache.axis2.client.ServiceClient.sendReceive()


        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);

        ServiceClient sender = new ServiceClient();
        sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
        sender.setOptions(options);
        OMElement result = sender.sendReceive(getPayload());

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


        //Blocking invocation via wsa mapping
        options.setAction("urn:sample/echo");

        ServiceClient sender = new ServiceClient();
        sender.setOptions(options);
        OMElement result = sender.sendReceive(getBody());

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

            options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);

            //Blocking invocation
            OMElement result = serviceClient.sendReceive(payload);

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

        try {

            ServiceClient sender = new ServiceClient();
            sender.setOptions(options);
            responseElement = sender.sendReceive(requestElement);

        } catch (AxisFault axisFault) {
            observer.updateError(axisFault.getMessage());
        }
View Full Code Here

            //Blocking Invocation
            ServiceClient sender = new ServiceClient();
            sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender.setOptions(options);
            OMElement result = sender.sendReceive(payload);

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

        options.setTransportInProtocol(Constants.TRANSPORT_TCP);

        ServiceClient sender = new ServiceClient();
        sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
        sender.setOptions(options);
        OMElement result = sender.sendReceive(getPayload());

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

        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

        ServiceClient sender = new ServiceClient();
        sender.setOptions(options);
        return sender.sendReceive(payload);
    }


    public void setTargetEPR(String targetEPR) {
        this.targetEPR = new EndpointReference(targetEPR);
View Full Code Here

            //Process the STS and service policy policy
            this.processPolicy(issuerPolicy, servicePolicy);
           
            try {
                OMElement response = client.sendReceive(rstQn,
                                                        createIssueRequest(requestType, appliesTo));
   
                return processIssueResponse(version, response, issuerAddress);
            } finally {
                client.cleanupTransport();
View Full Code Here

            ServiceClient client = getServiceClient(rstQn, issuerAddress);
            if(action != null) {
                client.getOptions().setAction(action);
            }
           
            return processCancelResponse(client.sendReceive(rstQn,
                                                            createCancelRequest(tokenId)));
        } catch (AxisFault e) {
            log.error("errorInCancelingToken", e);
            throw new TrustException("errorInCancelingToken", e);
        }
View Full Code Here

            client.engageModule("addressing");
            client.engageModule("rampart");

            this.processPolicy(issuerPolicy, null);
           
            OMElement response = client.sendReceive(rstQn,
                                                    createValidateRequest(requestType,tokenId));
           
            return true;
           
           
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.