Examples of EndpointReference


Examples of org.apache.axis2.addressing.EndpointReference

        rule.setCondition(eval);
        rule.addRewriteAction(action);
        mediator.addRule(rule);

        MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>");
        msgCtx.setTo(new EndpointReference("http://localhost:8280"));
        mediator.mediate(msgCtx);

        assertEquals(targetURL, msgCtx.getTo().getAddress());
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        rule.setCondition(eval);
        rule.addRewriteAction(action);
        mediator.addRule(rule);

        MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>");
        msgCtx.setTo(new EndpointReference("http://localhost:8280"));
        mediator.mediate(msgCtx);

        assertEquals(targetURL, msgCtx.getProperty("outURL"));
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        eval2.setRegex(Pattern.compile(".*/MyService"));
        rule2.setCondition(eval2);
        mediator.addRule(rule2);

        MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>");
        msgCtx.setTo(new EndpointReference("http://myhost:8280/MyService"));
        msgCtx.setProperty("port", 9000);
        mediator.mediate(msgCtx);

        assertEquals(targetURL, msgCtx.getProperty("outURL"));
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        rule1.setCondition(eval1);
        mediator.addRule(rule1);

        MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext(
                "<getQuote><symbol>IBM</symbol></getQuote>");
        msgCtx.setTo(new EndpointReference("http://localhost:9000/services/MyService"));
        mediator.mediate(msgCtx);

        assertEquals(targetURL, msgCtx.getProperty("outURL"));
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        OMElement element = AXIOMUtil.stringToOM(xml);
        URLRewriteMediator mediator = (URLRewriteMediator) new URLRewriteMediatorFactory().
                createMediator(element, new Properties());

        MessageContext msgCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>");
        msgCtx.setTo(new EndpointReference("http://test.org:9763/MyService"));
        msgCtx.setProperty("prop1", "value1");
        mediator.mediate(msgCtx);

        assertEquals("https://test.com:9443/services/StockQuoteService#id",
                msgCtx.getTo().getAddress());
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

            trailler += serviceName.substring(serviceName.indexOf("."));
            serviceName = serviceName.substring(0, serviceName.indexOf('.'));
        }

        if (serviceNameToEPRMap.containsKey(serviceName)) {
            return new EndpointReference(
                    customEPRPrefix + serviceNameToEPRMap.get(serviceName) + trailler);
        } else {
            return new EndpointReference(serviceEPRPrefix + serviceName + trailler);
        }
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

            serviceName = serviceName.substring(0, serviceName.indexOf('.'));
        }

        EndpointReference[] endpointReferences = new EndpointReference[1];
        if (serviceNameToEPRMap.containsKey(serviceName)) {
            endpointReferences[0] = new EndpointReference(
                    customEPRPrefix + serviceNameToEPRMap.get(serviceName) + trailler);
        } else {
            endpointReferences[0]
                    = new EndpointReference(serviceEPRPrefix + serviceName + trailler);
        }
        return endpointReferences;
    }
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

        }

        Map<String, String> parameters = new HashMap<String, String>();
        int pos = uri.indexOf("?");
        if (pos != -1) {
            msgContext.setTo(new EndpointReference(uri.substring(0, pos)));
            StringTokenizer st = new StringTokenizer(uri.substring(pos+1), "&");
            while (st.hasMoreTokens()) {
                String param = st.nextToken();
                pos = param.indexOf("=");
                if (pos != -1) {
                    parameters.put(param.substring(0, pos), param.substring(pos+1));
                } else {
                    parameters.put(param, null);
                }
            }
        } else {
            msgContext.setTo(new EndpointReference(uri));
        }

        if (uri.equals("/favicon.ico")) {
            response.setStatusCode(HttpStatus.SC_MOVED_PERMANENTLY);
            response.addHeader(LOCATION, "http://ws.apache.org/favicon.ico");
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

                && !msgContext.getReplyTo().hasNoneAddress()) {

            msgContext.setProperty(NhttpConstants.IGNORE_SC_ACCEPTED, Constants.VALUE_TRUE);
        }

        EndpointReference epr = NhttpUtil.getDestinationEPR(msgContext);
        if (epr != null) {
            if (!epr.hasNoneAddress()) {
                sendAsyncRequest(epr, msgContext);
            } else {
                handleException("Cannot send message to " + AddressingConstants.Final.WSA_NONE_URI);
            }
        } else {
View Full Code Here

Examples of org.apache.axis2.addressing.EndpointReference

    public File getRequestFile() {
        return requestFile;
    }

    public EndpointReference getEndpointReference() throws Exception {
        return new EndpointReference("vfs:" + requestFile.getAbsoluteFile().toURL());
    }
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.