Examples of SequenceAdminServiceStub


Examples of org.wso2.carbon.sequences.stub.types.SequenceAdminServiceStub

        String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
        ConfigurationContext configContext = (ConfigurationContext)
                config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
        String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
        String serviceURL = backendServerURL + "SequenceAdminService";
        sequenceAdminStub = new SequenceAdminServiceStub(configContext, serviceURL);
        ServiceClient client = sequenceAdminStub._getServiceClient();
        Options option = client.getOptions();
        option.setManageSession(true);
        option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
    }
View Full Code Here

Examples of org.wso2.carbon.sequences.stub.types.SequenceAdminServiceStub

    @Override
    public void runSuccessCase() {

        AuthenticateStub authenticateStub = new AuthenticateStub();
        SequenceAdminServiceStub sequenceAdminServiceStub;

        try {
            sequenceAdminServiceStub = new SequenceAdminServiceStub("https://" +
                    FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT +
                    "/services/SequenceAdminService");
            authenticateStub.authenticateAdminStub(sequenceAdminServiceStub, sessionCookie);
        } catch (AxisFault axisFault) {
            handleError("Error while authenticating the sequence admin stub", axisFault);
            return;
        }

        try {
            int before = sequenceAdminServiceStub.getDynamicSequenceCount();
            ArtifactReader artifactReader = new ArtifactReader();
            OMElement omElement = artifactReader.getOMElement(SequenceAddRemoveTest.class.getResource("/synapse.xml").getPath());

            // add new sequence
            sequenceAdminServiceStub.addDynamicSequence("conf:/testDynamicSeq", omElement);
            sequenceAdminServiceStub.addDynamicSequence("gov:/testDynamicSeq", omElement);
            int after = sequenceAdminServiceStub.getDynamicSequenceCount();
            assertEquals(2, after - before);

            sequenceAdminServiceStub.deleteDynamicSequence("conf:/testDynamicSeq");
            sequenceAdminServiceStub.deleteDynamicSequence("gov:/testDynamicSeq");
            after = sequenceAdminServiceStub.getDynamicSequenceCount();
            assertEquals(before, after);
        } catch (RemoteException e) {
            handleError("Error while contacting the sequence admin service", e);
        } catch (SequenceEditorException e) {
            handleError("Error while invoking the sequence admin service", e);
View Full Code Here

Examples of org.wso2.carbon.sequences.stub.types.SequenceAdminServiceStub

    @Override
    public void runSuccessCase() {

        AuthenticateStub authenticateStub = new AuthenticateStub();
        SequenceAdminServiceStub sequenceAdminServiceStub;

        try {
            sequenceAdminServiceStub = new SequenceAdminServiceStub("https://" +
                    FrameworkSettings.HOST_NAME + ":" + FrameworkSettings.HTTPS_PORT +
                    "/services/SequenceAdminService");
            authenticateStub.authenticateAdminStub(sequenceAdminServiceStub, sessionCookie);
        } catch (AxisFault axisFault) {
            handleError("Error while authenticating the sequence admin stub", axisFault);
            return;
        }

        try {
            int before = sequenceAdminServiceStub.getSequencesCount();
            ArtifactReader artifactReader = new ArtifactReader();
            OMElement omElement = artifactReader.getOMElement(SequenceAddRemoveTest.class.getResource("/synapse.xml").getPath());

            // add new sequence
            sequenceAdminServiceStub.addSequence(omElement);
            int after = sequenceAdminServiceStub.getSequencesCount();
            assertEquals(1, after - before);
            assertNotNull(sequenceAdminServiceStub.getSequence(SEQUENCE_NAME));
            assertEquals(SEQUENCE_NAME, sequenceAdminServiceStub.enableStatistics(SEQUENCE_NAME));
            assertEquals(SEQUENCE_NAME, sequenceAdminServiceStub.enableTracing(SEQUENCE_NAME));

            sequenceAdminServiceStub.deleteSequence(SEQUENCE_NAME);
            after = sequenceAdminServiceStub.getSequencesCount();
            assertEquals(before, after);
        } catch (RemoteException e) {
            handleError("Error while contacting the sequence admin service", e);
        } catch (SequenceEditorException e) {
            handleError("Error while invoking the sequence admin service", 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.