Package org.apache.axis2.client

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


            //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

        this.processPolicy(issuerPolicy, null);
       
        String tokenType = RahasConstants.TOK_TYPE_SAML_10;
       
        OMElement response = client.sendReceive(rstQn,
                                                createRenewRequest(tokenType,tokenId));
       
        return true;
       
        } catch (AxisFault e) {
View Full Code Here

            this.processPolicy(issuerPolicy, null);

            String tokenType = RahasConstants.TOK_TYPE_SAML_10;

            OMElement response = client.sendReceive(rstQn,
                    createRenewRequest(tokenType, tokenId));
            store.update(processRenewResponse(version, response, store, tokenId));

            return true;
View Full Code Here

               
                // Invoking the serive in the TestCase-28 should fail. So handling it differently..
                if (i == 28) {
                    try {
                        //Blocking invocation
                        serviceClient.sendReceive(getOMElement());
                        fail("Service Should throw an error..");

                    } catch (AxisFault axisFault) {
                        assertEquals("Expected encrypted part missing", axisFault.getMessage());
                    }
View Full Code Here

                    }
                }

                else{
                    //Blocking invocation
                    serviceClient.sendReceive(getEchoElement());
                }
            }

            System.out.println("--------------Testing negative scenarios----------------------------");
View Full Code Here

                        loadPolicy("/rampart/policy/" + i + ".xml"));
                serviceClient.setOptions(options);

                try {
                    //Blocking invocation
                    serviceClient.sendReceive(getOMElement());
                    fail("Service Should throw an error..");

                } catch (AxisFault axisFault) {
                    assertEquals("Testing negative scenarios with Apache Rampart. Intentional Exception", axisFault.getMessage());
                }
View Full Code Here

                serviceClient.getServiceContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY, loadPolicy("/rampart/policy/sc-" + i + ".xml"));
                serviceClient.setOptions(options);

                //Blocking invocation
                serviceClient.sendReceive(getEchoElement());
                serviceClient.sendReceive(getEchoElement());

                //Cancel the token
                options.setProperty(RampartMessageData.CANCEL_REQUEST, Constants.VALUE_TRUE);
                serviceClient.sendReceive(getEchoElement());
View Full Code Here

                serviceClient.getServiceContext().setProperty(RampartMessageData.KEY_RAMPART_POLICY, loadPolicy("/rampart/policy/sc-" + i + ".xml"));
                serviceClient.setOptions(options);

                //Blocking invocation
                serviceClient.sendReceive(getEchoElement());
                serviceClient.sendReceive(getEchoElement());

                //Cancel the token
                options.setProperty(RampartMessageData.CANCEL_REQUEST, Constants.VALUE_TRUE);
                serviceClient.sendReceive(getEchoElement());
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.