Package org.switchyard.config

Examples of org.switchyard.config.ConfigurationPuller


    private ConfigurationPuller _cfg_puller;
    private SCAActivator activator;
   
    @Before
    public void setUp() throws Exception {
        _cfg_puller = new ConfigurationPuller();
        activator = new SCAActivator(_cfg_puller.pull(TEST_XML, getClass()));
    }
View Full Code Here


            QName qname = soapHeader.getElementQName();
            if (matches(qname)) {
                final Object value;
                switch (_soapHeadersType != null ? _soapHeadersType : SOAPHeadersType.VALUE) {
                    case CONFIG:
                        value = new ConfigurationPuller().pull(soapHeader);
                        break;
                    case DOM:
                        value = soapHeader;
                        break;
                    case VALUE:
                        value = soapHeader.getValue();
                        break;
                    case XML:
                        value = new ConfigurationPuller().pull(soapHeader).toString();
                        break;
                    default:
                        value = null;
                }
                if (value != null) {
View Full Code Here

    private Element getChildElement(SOAPMessage message, QName qname) throws Exception {
        return (Element)message.getSOAPHeader().getChildElements(qname).next();
    }

    private Configuration newConfiguration(String xml) throws Exception {
        return new ConfigurationPuller().pull(new StringReader(xml));
    }
View Full Code Here

    private Configuration newConfiguration(String xml) throws Exception {
        return new ConfigurationPuller().pull(new StringReader(xml));
    }

    private String toString(Element element) throws Exception {
        return new ConfigurationPuller().pull(element).toString();
    }
View Full Code Here

    public void execute() throws MojoExecutionException, MojoFailureException {
        parseVersion(_oldVersion, true);
        parseVersion(_newVersion, false);
        AtomicBoolean projectModified = new AtomicBoolean(false);
        try {
            Configuration project = new ConfigurationPuller(false).pull(_project_file);
            if (project != null) {
                setVersion(project.getFirstChild("version"), _newVersion_pom, projectModified);
                Configuration project_parent = project.getFirstChild("parent");
                if (project_parent != null) {
                    Configuration project_parent_groupId = project_parent.getFirstChild("groupId");
View Full Code Here

    protected BaseModel(String namespace, String name) {
        this(XMLHelper.createQName(namespace, name));
    }

    protected BaseModel(QName qname) {
        this(new ConfigurationPuller().pull(qname));
    }
View Full Code Here

        PropertyMixIn pmi = SwitchYardTestKit.newMixInInstance(PropertyMixIn.class, this);
        Assert.assertNotNull(pmi);
        pmi.set("test.name", "ThyName");
        pmi.set("test.value", Integer.valueOf(100));
        String xml = "<test name='${test.name}'>${test.value}</test>";
        Configuration config = new ConfigurationPuller().pull(new StringReader(xml));
        Assert.assertEquals("ThyName", config.getAttribute("name"));
        Assert.assertEquals("100", config.getValue());
    }
View Full Code Here

    public M pull(Element element) {
        String namespace = element.getNamespaceURI();
        if (namespace != null) {
            Marshaller marshaller = _desc.getMarshaller(namespace);
            if (marshaller != null) {
                return (M) marshaller.read(new ConfigurationPuller().pull(element));
            }
        }
        return null;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private <T> T unwrapResponse(Class<T> declaredType, String envelope) throws Exception {
        // TODO: replace with generic DOM code vs. using config helper code
        Configuration body = new ConfigurationPuller().pull(new StringReader(envelope)).getFirstChild("Body").getChildren().iterator().next();
        String content = body.toString();
        if (body.getName().equals("Fault")) {
            throw new Exception("Fault returned: " + content);
        } else {
            JAXBContext ctx = JAXBContext.newInstance("org.switchyard.quickstarts.demos.library.types");
View Full Code Here

TOP

Related Classes of org.switchyard.config.ConfigurationPuller

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.