Package org.apache.axis2.description

Examples of org.apache.axis2.description.TransportOutDescription


        copyProperties(mainInMsgContext, tenantInMsgCtx);
        tenantInMsgCtx.setTo(new EndpointReference(requestUri));

        // set a dummy transport out description
        String transportOutName = mainInMsgContext.getTransportOut().getName();
        TransportOutDescription transportOutDescription =
                tenantConfigCtx.getAxisConfiguration().getTransportOut(transportOutName);
        tenantInMsgCtx.setTransportOut(transportOutDescription);
        TransportInDescription incomingTransport =
                tenantConfigCtx.getAxisConfiguration().
                        getTransportIn(mainInMsgContext.getIncomingTransportName());
View Full Code Here


            AxisConfiguration tenantAxisConfig = tenantConfigCtx.getAxisConfiguration();

            TenantTransportSender transportSender = new TenantTransportSender(mainConfigCtx);
            //adding new transport outs
            // adding the two tenant specific transport senders
            TransportOutDescription httpOutDescription = new TransportOutDescription(Constants.TRANSPORT_HTTP);
            httpOutDescription.setSender(transportSender);
            tenantAxisConfig.addTransportOut(httpOutDescription);

            // adding the two tenant specific transport senders
            TransportOutDescription httpsOutDescription = new TransportOutDescription(Constants.TRANSPORT_HTTPS);
            httpsOutDescription.setSender(transportSender);
            tenantAxisConfig.addTransportOut(httpsOutDescription);

            // Set the work directory
            tenantConfigCtx.setProperty(ServerConstants.WORK_DIR,
                                        mainConfigCtx.getProperty(ServerConstants.WORK_DIR));
View Full Code Here

        MessageContext msgContext = new MessageContext();
        msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTP);
        msgContext.setProperty(MessageContext.REMOTE_ADDR, request.getRemoteAddr());

        try {
            TransportOutDescription transportOut = this.configurationContext.getAxisConfiguration()
                    .getTransportOut(Constants.TRANSPORT_HTTP);
            TransportInDescription transportIn = this.configurationContext.getAxisConfiguration()
                    .getTransportIn(Constants.TRANSPORT_HTTP);

            msgContext.setConfigurationContext(this.configurationContext);
View Full Code Here

    protected void setUp() throws Exception {

        AxisConfiguration engineRegistry = new AxisConfiguration();
        configContext = new ConfigurationContext(engineRegistry);

        TransportOutDescription transport = new TransportOutDescription("null");
        transport.setSender(new CommonsHTTPTransportSender());

        TransportInDescription transportIn = new TransportInDescription("null");
        AxisOperation axisOp = new InOutAxisOperation(operationName);

        AxisService service = new AxisService(serviceName.getLocalPart());
View Full Code Here

    String action = (String) message.getProperty(XMPPConstants.ACTION);
    MessageContext msgContext = null;

    TransportInDescription transportIn = configurationContext
        .getAxisConfiguration().getTransportIn("xmpp");
    TransportOutDescription transportOut = configurationContext
        .getAxisConfiguration().getTransportOut("xmpp");
    if ((transportIn != null) && (transportOut != null)) {
      msgContext = configurationContext.createMessageContext();
      msgContext.setTransportIn(transportIn);
      msgContext.setTransportOut(transportOut);
View Full Code Here

        configurationContext.getAxisConfiguration().getInFlowPhases().add(dispatchPhase);

        //----------------------------
        // transport-related objects
        //----------------------------
        transportOut = new TransportOutDescription("null");
        transportOut2 = new TransportOutDescription("happy");
        transportOut3 = new TransportOutDescription("golucky");
        transportOut.setSender(new CommonsHTTPTransportSender());
        transportOut2.setSender(new CommonsHTTPTransportSender());
        transportOut3.setSender(new CommonsHTTPTransportSender());

        axisConfiguration.addTransportOut(transportOut3);
View Full Code Here

     * Ensure that if the scheme of the To EPR for the response is different than the
     * transport used for the request that the correct TransportOut is available
     */
    private static void setupCorrectTransportOut(MessageContext context) throws AxisFault {
        // Determine that we have the correct transport available.
        TransportOutDescription transportOut = context.getTransportOut();

        try {
            EndpointReference responseEPR = context.getTo();
            if (context.isServerSide() && responseEPR != null) {
                if (!responseEPR.hasAnonymousAddress() && !responseEPR.hasNoneAddress()) {
                    URI uri = new URI(responseEPR.getAddress());
                    String scheme = uri.getScheme();
                    if (!transportOut.getName().equals(scheme)) {
                        ConfigurationContext configurationContext =
                                context.getConfigurationContext();
                        transportOut = configurationContext.getAxisConfiguration()
                                .getTransportOut(scheme);
                        if (transportOut == null) {
View Full Code Here

        HashMap transportOuts = axisConf.getTransportsOut();

        Iterator values = transportOuts.values().iterator();

        while (values.hasNext()) {
            TransportOutDescription transportOut = (TransportOutDescription) values.next();
            TransportSender sender = transportOut.getSender();

            if (sender != null) {
                try {
                    sender.init(configContext, transportOut);
                } catch (AxisFault axisFault) {
                    log.info(Messages.getMessage("transportiniterror", transportOut.getName()));
                }
            }
        }
    }
View Full Code Here

            LOG.debug("Request method: " + request.getMethod());
            LOG.debug("Target URI: " + request.getRequestURI());
        }

        try {
            TransportOutDescription transportOut = this.configurationContext.getAxisConfiguration()
                    .getTransportOut(Constants.TRANSPORT_HTTP);
            TransportInDescription transportIn = this.configurationContext.getAxisConfiguration()
                    .getTransportIn(Constants.TRANSPORT_HTTP);

            String sessionKey = (String) context.getAttribute(HTTPConstants.COOKIE_STRING);
View Full Code Here

        operationContext = serviceContext.createOperationContext(operationName);

        //-----------------------------------------------------------------

        transportOut = new TransportOutDescription("null");
        transportOut2 = new TransportOutDescription("happy");
        transportOut3 = new TransportOutDescription("golucky");
        transportOut.setSender(new CommonsHTTPTransportSender());
        transportOut2.setSender(new CommonsHTTPTransportSender());
        transportOut3.setSender(new CommonsHTTPTransportSender());
        axisConfiguration.addTransportOut(transportOut3);
        axisConfiguration.addTransportOut(transportOut2);
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.TransportOutDescription

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.