Package org.apache.axis2.client

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


            sender.setOptions(options);

            sender.fireAndForget(updatePayload);
            System.err.println("done");
            Thread.sleep(3000);
            OMElement result = sender.sendReceive(getPricePayload);

            String response = result.getFirstElement().getText();
            System.err.println("Current price of WSO: " + response);

        } catch (Exception e) {
View Full Code Here


        Options options = new Options();
        options.setTo(
                new EndpointReference("http://127.0.0.1:10000/CommodityQuote"));
        businessClient.setOptions(options);

        OMElement response = businessClient.sendReceive(commodityPayload());

        assertNotNull(response);

        OMElement returnEle = response.getFirstChildWithName(new QName("return"));
View Full Code Here

    clientOptions.setTo(new EndpointReference (to));
    clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
    clientOptions.setProperty(SandeshaClientConstants.UNRELIABLE_MESSAGE,"true");
    serviceClient.setOptions(clientOptions);
   
    OMElement result = serviceClient.sendReceive(getEchoOMBlock("echo1", "sync"));
   
    // Check the response
    String echoStr = checkEchoOMBlock(result);
    assertEquals(echoStr, "echo1");
   
View Full Code Here

            options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
            options.setAction("urn:echo");
            serviceClient.setOptions(options);
           
            //Blocking invocation
            OMElement result = serviceClient.sendReceive(payload);

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

        Options options = new Options();
        options.setTo(
                new EndpointReference("http://127.0.0.1:10100/CommodityQuote"));
        businessClient.setOptions(options);

        OMElement response = businessClient.sendReceive(commodityPayload());

        assertNotNull(response);

        AXIOMXPath xPath = new AXIOMXPath("//return");
        xPath.addNamespace("ns","http://services.samples/xsd");
View Full Code Here

            client.getOptions().setSoapVersionURI(this.soapVersion);
            client.engageModule("addressing");

            //Process the STS and service policy policy
            this.processPolicy(issuerPolicy, servicePolicy);
            OMElement response = client.sendReceive(rstQn,
                                                    createIssueRequest(requestType, appliesTo));

            return processIssueResponse(version, response, issuerAddress);
        } catch (AxisFault e) {
            e.printStackTrace();
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.setOptions(options);

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

    OMElement response = client.sendReceive(getPayload());
    OMElement saml = getSAMLToken(response);
   
    System.out.println(saml);

  }
View Full Code Here

            client.engageModule("rampart");

            //Process the STS and service policy policy
            this.processPolicy(issuerPolicy, servicePolicy);
           
            OMElement response = client.sendReceive(rstQn,
                                                    createIssueRequest(requestType, appliesTo));

            return processIssueResponse(version, response, issuerAddress);
        } catch (AxisFault e) {
            e.printStackTrace();
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

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.