Package org.apache.axis

Examples of org.apache.axis.AxisEngine


                scopeHolder.value = Scope.DEFAULT.getValue();
                return getNewServiceObject(msgContext, clsName);
            }
        } else if (scope == Scope.APPLICATION) {
            // MUST be AxisEngine here!
            AxisEngine engine = msgContext.getAxisEngine();
            if (engine.getApplicationSession() != null) {
                // This part isn't thread safe
                synchronized (this) {
                    // store service objects in session, indexed by class name
                    Object obj =
                            engine.getApplicationSession().get(serviceName);
                    if (obj == null) {
                        obj = getNewServiceObject(msgContext, clsName);
                        engine.getApplicationSession().set(serviceName, obj);
                    }
                    return obj;
                }
            } else {
                // was no application session, sigh, treat as request scope
View Full Code Here


                }
            }
        }
       
        String rootNS = root.getNamespaceURI();
        AxisEngine engine = msgContext.getAxisEngine();
       
        // If this is WSDD, process it correctly.
        if (rootNS != null && rootNS.equals(WSDDConstants.URI_WSDD)) {
            return processWSDD(msgContext, engine, root);
        }
View Full Code Here

            // System.exit( 1 );
        }

        Admin admin = new Admin();

        AxisEngine engine;
        if ( args[0].equals("client") )
            engine = new AxisClient();
        else
            engine = new AxisServer();
        engine.setShouldSaveConfig(true);
        engine.init();
        MessageContext msgContext = new MessageContext(engine);

        try {
            for ( i = 1 ; i < args.length ; i++ ) {
                if (log.isDebugEnabled())
View Full Code Here

                endpointUri = new MuleEndpointURI(uri, context.getMuleContext());
            }

            endpointUri.initialise();

            AxisEngine engine = getAxis();
            String pathInfo = endpointUri.getPath();
            boolean wsdlRequested = false;
            boolean listRequested = false;

            if (endpointUri.getAddress().endsWith(".jws"))
View Full Code Here

    protected void doPost(MuleEventContext context, AxisStringWriter response)
        throws Exception
    {
        String soapAction;
        Message responseMsg;
        AxisEngine engine = getAxis();
        if (engine == null)
        {

            throw new MessagingException(CoreMessages.objectIsNull("Axis Engine"), context.getMessage());
        }
        MessageContext msgContext = new MessageContext(engine);

        String contentType;
        try
        {
            EndpointURI endpointUri = new MuleEndpointURI(context.getEndpointURI().toString(), context.getMuleContext());
            endpointUri.initialise();
            populateMessageContext(msgContext, context, endpointUri);
            if (securityProvider != null)
            {
                if (logger.isDebugEnabled())
                {
                    logger.debug("securityProvider:" + securityProvider);
                }
                msgContext.setProperty("securityProvider", securityProvider);
            }

            Object request = context.getMessage().getPayload();
            if (request instanceof File)
            {
                request = new FileInputStream((File)request);
            }
            else if (request instanceof byte[])
            {
                request = new ByteArrayInputStream((byte[])request);
            }

            final String cType = context.getMessage().getInboundProperty(HTTPConstants.HEADER_CONTENT_TYPE);
            final String cLocation = context.getMessage().getInboundProperty(HTTPConstants.HEADER_CONTENT_LOCATION);
            Message requestMsg = new Message(request, false, cType, cLocation);

            if (logger.isDebugEnabled())
            {
                logger.debug("Request Message:" + requestMsg);
            }
            msgContext.setRequestMessage(requestMsg);
            msgContext.setProperty("transport.url", endpointUri.toString());

            soapAction = getSoapAction(context);
            if (soapAction != null)
            {
                msgContext.setUseSOAPAction(true);
                msgContext.setSOAPActionURI(soapAction);
            }
            msgContext.setSession(new AxisMuleSession(context.getSession()));

            if (logger.isDebugEnabled())
            {
                logger.debug("Invoking Axis Engine.");
            }
            populateAxisProperties();
            engine.invoke(msgContext);
            if (logger.isDebugEnabled())
            {
                logger.debug("Return from Axis Engine.");
            }
            if (RequestContext.getExceptionPayload() instanceof Exception)
View Full Code Here

    }

    protected void processWsdlRequest(MessageContext msgContext, AxisStringWriter response)
        throws AxisFault
    {
        AxisEngine engine = getAxis();
        try
        {
            engine.generateWSDL(msgContext);
            Document doc = (Document)msgContext.getProperty("WSDL");
            if (doc != null)
            {
                response.setProperty(HttpConstants.HEADER_CONTENT_TYPE, "text/xml");
                XMLUtils.DocumentToWriter(doc, response.getWriter());
View Full Code Here

                        + body + "</SOAP-ENV:Body>" + "</SOAP-ENV:Envelope>";
        Message responseMsg = null;
        try
        {
            ByteArrayInputStream istream = new ByteArrayInputStream(msgtxt.getBytes("ISO-8859-1"));
            AxisEngine engine = getAxis();
            Message msg = new Message(istream, false);
            msgContext.setRequestMessage(msg);
            populateAxisProperties();
            engine.invoke(msgContext);
            responseMsg = msgContext.getResponseMessage();
            response.setProperty(HTTPConstants.HEADER_CACHE_CONTROL, "no-cache");
            response.setProperty(HTTPConstants.HEADER_PRAGMA, "no-cache");
            if (responseMsg == null)
            {
View Full Code Here

        response.write("<i>" + Messages.getMessage("perhaps00") + "</i>");
    }

    protected void processListRequest(AxisStringWriter response) throws AxisFault
    {
        AxisEngine engine = getAxis();
        response.setProperty(HTTPConstants.HEADER_CONTENT_TYPE, "text/html");
        if (enableList)
        {
            Document doc = Admin.listConfig(engine);
            if (doc != null)
View Full Code Here

    }

    protected void reportAvailableServices(MuleEventContext context, AxisStringWriter response)
        throws ConfigurationException, AxisFault
    {
        AxisEngine engine = getAxis();
        response.setProperty(HttpConstants.HEADER_CONTENT_TYPE, "text/html");
        response.write("<h2>And now... Some Services</h2>");
        String version = MuleManifest.getProductVersion();
        if (version == null)
        {
            version = "Version Not Set";
        }
        response.write("<h5>(Mule - " + version + ")</h5>");
        Iterator i;

        try
        {
            response
                .write("<table width=\"400\"><tr><th>Mule Component Services</th><th>Axis Services</th></tr><tr><td width=\"200\" valign=\"top\">");
            i = engine.getConfig().getDeployedServices();
            listServices(i, response);
            response.write("</td><td width=\"200\" valign=\"top\">");
            i = ((MuleConfigProvider)engine.getConfig()).getAxisDeployedServices();
            listServices(i, response);
            response.write("</td></tr></table>");
        }
        catch (ConfigurationException configException)
        {
View Full Code Here

        // NOTREACHED
        return null;
    }

    private Object getApplicationScopedObject(MessageContext msgContext, String serviceName, String clsName, IntHolder scopeHolder) throws Exception {
        AxisEngine engine = msgContext.getAxisEngine();
        Session appSession = engine.getApplicationSession();
        if (appSession != null) {
            return getSessionServiceObject(appSession, serviceName,
                                           msgContext, clsName);
        } else {
            // was no application session - log an error and
View Full Code Here

TOP

Related Classes of org.apache.axis.AxisEngine

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.