Package org.apache.synapse.core.axis2

Examples of org.apache.synapse.core.axis2.ProxyService


            "name=\"name\" startOnLoad=\"true\"  transports=\"http\"><description>" +
            "description</description><target><inSequence onError=\"ref\"><description>Test documentation</description><send/></inSequence>" +
            "<outSequence><send/></outSequence></target><publishWSDL  key=\"key\"></publishWSDL>" +
            "<policy key=\"key\"/><parameter name=\"para\">text</parameter></proxy>";
        OMElement inputOM = createOMElement(inputXml);
        ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties());
        OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy);
        assertTrue(compare(resultOM, inputOM));
    }
View Full Code Here


            "name=\"name\" startOnLoad=\"true\"  transports=\"http\"><description>" +
            "description</description><target><inSequence onError=\"ref\"><send/></inSequence>" +
            "<outSequence><send/></outSequence></target><enableAddressing/><publishWSDL  key=\"key\"></publishWSDL>" +
            "<policy key=\"key\"/><parameter name=\"para\">text</parameter></proxy>";
        OMElement inputOM = createOMElement(inputXml);
        ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties());
        OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy);
        assertTrue(compare(resultOM, inputOM));
    }
View Full Code Here

            "name=\"name\"  transports=\"http\"><description>description</description><target>" +
            "<endpoint><address uri=\"http://www.example.com/testepr\"/></endpoint><outSequence><send/>" +
            "</outSequence></target><publishWSDL uri=\"http://uri\"></publishWSDL><policy key=\"key\"/>" +
            "<parameter name=\"para\">text</parameter></proxy>";
        OMElement inputOM = createOMElement(inputXml);
        ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties());
        OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy);
        assertTrue(compare(resultOM, inputOM));
    }
View Full Code Here

            "startOnLoad=\"true\"><target><endpoint><address uri=\"http://www.example.com/testepr\"/>" +
            "</endpoint><outSequence><send/></outSequence></target><publishWSDL uri=\"http://uri\">" +
            "<resource location=\"test1.xsd\" key=\"test-key1\"/><resource location=\"test2.xsd\"" +
            " key=\"test-key2\"/></publishWSDL></proxy>";
        OMElement inputOM = createOMElement(inputXml);
        ProxyService proxy = ProxyServiceFactory.createProxy(inputOM, new Properties());
        assertNotNull(proxy.getResourceMap());
        OMElement resultOM = ProxyServiceSerializer.serializeProxy(null, proxy);
        assertTrue(compare(resultOM, inputOM));
    }
View Full Code Here

     *
     * @param name
     *            of the Proxy Service to be deleted
     */
    public synchronized void removeProxyService(String name) {
        ProxyService proxy = proxyServices.get(name);
        if (proxy == null) {
            handleException("Unknown proxy service for name : " + name);
        } else {
            try {
                if (getAxisConfiguration().getServiceForActivation(name) != null) {
View Full Code Here

        synapseConfig.addEntry(entry.getKey(), entry);
        assertItemAdded(entry.getKey(), ENTRY);
        synapseConfig.removeEntry(entry.getKey());
        assertItemRemoved(entry.getKey(), ENTRY);

        ProxyService proxy = new ProxyService("proxy1");
        synapseConfig.addProxyService(proxy.getName(), proxy);
        assertItemAdded(proxy.getName(), PROXY);
        synapseConfig.removeProxyService(proxy.getName());
        assertItemRemoved(proxy.getName(), PROXY);

        Startup startup = new SimpleQuartz();
        startup.setName("startup1");
        synapseConfig.addStartup(startup);
        assertItemAdded(startup.getName(), STARTUP);
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug("ProxyService Deployment from file : " + fileName + " : Started");
        }

        try {
            ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties);
            if (proxy != null) {
                proxy.setFileName((new File(fileName)).getName());
                if (log.isDebugEnabled()) {
                    log.debug("ProxyService named '" + proxy.getName()
                            + "' has been built from the file " + fileName);
                }
                initializeProxy(proxy);
                if (log.isDebugEnabled()) {
                    log.debug("Initialized the ProxyService : " + proxy.getName());
                }
               
                proxy.buildAxisService(getSynapseConfiguration(),
                        getSynapseConfiguration().getAxisConfiguration());
                if (log.isDebugEnabled()) {
                    log.debug("Started the ProxyService : " + proxy.getName());
                }
                getSynapseConfiguration().addProxyService(proxy.getName(), proxy);
                if (log.isDebugEnabled()) {
                    log.debug("ProxyService Deployment from file : " + fileName + " : Completed");
                }
                log.info("ProxyService named '" + proxy.getName()
                        + "' has been deployed from file : " + fileName);
                return proxy.getName();
            } else {
                handleSynapseArtifactDeploymentError("ProxyService Deployment Failed. The " +
                        "artifact described in the file " + fileName + " is not a ProxyService");
            }
        } catch (Exception e) {
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug("ProxyService Update from file : " + fileName + " : Started");
        }

        try {
            ProxyService proxy = ProxyServiceFactory.createProxy(artifactConfig, properties);
            if (proxy != null) {
                proxy.setFileName((new File(fileName)).getName());
                if (log.isDebugEnabled()) {
                    log.debug("ProxyService named '" + proxy.getName()
                            + "' has been built from the file " + fileName);
                }
                initializeProxy(proxy);
                if (log.isDebugEnabled()) {
                    log.debug("Initialized the ProxyService : " + proxy.getName());
                }
                proxy.stop(getSynapseConfiguration());
                getSynapseConfiguration().removeProxyService(existingArtifactName);
                if (!existingArtifactName.equals(proxy.getName())) {
                    log.info("ProxyService named " + existingArtifactName + " has been Undeployed");
                }
                proxy.buildAxisService(getSynapseConfiguration(),
                        getSynapseConfiguration().getAxisConfiguration());
                if (log.isDebugEnabled()) {
                    log.debug("Started the ProxyService : " + proxy.getName());
                }
                getSynapseConfiguration().addProxyService(proxy.getName(), proxy);
                if (log.isDebugEnabled()) {
                    log.debug("ProxyService " + (existingArtifactName.equals(proxy.getName()) ?
                            "update" : "deployment") + " from file : " + fileName + " : Completed");
                }
                log.info("ProxyService named '" + proxy.getName()
                        + "' has been " + (existingArtifactName.equals(proxy.getName()) ?
                            "update" : "deployed") + " from file : " + fileName);
                return proxy.getName();
            } else {
                handleSynapseArtifactDeploymentError("ProxyService Update Failed. The artifact " +
                        "described in the file " + fileName + " is not a ProxyService");
            }
        } catch (Exception e) {
View Full Code Here

            log.debug("ProxyService Undeployment of the proxy named : "
                    + artifactName + " : Started");
        }
       
        try {
            ProxyService proxy = getSynapseConfiguration().getProxyService(artifactName);
            if (proxy != null) {
                if (log.isDebugEnabled()) {
                    log.debug("Stopping the ProxyService named : " + artifactName);
                }
                proxy.stop(getSynapseConfiguration());
                getSynapseConfiguration().removeProxyService(artifactName);
                if (log.isDebugEnabled()) {
                    log.debug("ProxyService Undeployment of the proxy named : "
                            + artifactName + " : Completed");
                }
                log.info("ProxyService named '" + proxy.getName() + "' has been undeployed");
            } else if (log.isDebugEnabled()) {
                log.debug("Proxy service " + artifactName + " has already been undeployed");
            }
        } catch (Exception e) {
            handleSynapseArtifactDeploymentError(
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug("Restoring the ProxyService with name : " + artifactName + " : Started");
        }

        try {
            ProxyService proxy
                    = getSynapseConfiguration().getProxyService(artifactName);
            OMElement proxyElem = ProxyServiceSerializer.serializeProxy(null, proxy);
            if (proxy.getFileName() != null) {
                String fileName = getServerConfigurationInformation().getSynapseXMLLocation()
                        + File.separator + MultiXMLConfigurationBuilder.PROXY_SERVICES_DIR
                        + File.separator + proxy.getFileName();
                writeToFile(proxyElem, fileName);
                if (log.isDebugEnabled()) {
                    log.debug("Restoring the ProxyService with name : "
                            + artifactName + " : Completed");
                }
View Full Code Here

TOP

Related Classes of org.apache.synapse.core.axis2.ProxyService

Copyright © 2018 www.massapicom. 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.