Package org.apache.axis

Examples of org.apache.axis.AxisEngine


    public static String getJNDIConfigFileName(MessageContext messageContext)
    {
        String file = null;
        if(messageContext != null)
        {
            AxisEngine engine = messageContext.getAxisEngine();
            ContainerConfig config = ContainerConfig.getConfig(engine);
            file = config.getOption("jndiConfigFileOption");
        }
        return (file == null) ? "etc/" + JNDI_CONFIG : file;
    }
View Full Code Here


                uri += context.getMessage().getInboundProperty(HttpConnector.HTTP_REQUEST_PROPERTY, StringUtils.EMPTY);
                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 = getEndpoint(context);
            EndpointURI endpointUri = context.getEndpointURI();
            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.");
            }
            AxisServiceProxy.setProperties(RequestContext.getEvent().getEndpoint().getProperties());
            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);
            AxisServiceProxy.setProperties(RequestContext.getEvent().getEndpoint().getProperties());
            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

                encodingStyle = org.apache.axis.Constants.URI_SOAP11_ENC;
            }
        }
        //register our type descriptors
        Service service = ((ServiceImpl) serviceImpl).getService();
        AxisEngine axisEngine = service.getEngine();
        TypeMappingRegistry typeMappingRegistry = axisEngine.getTypeMappingRegistry();
        TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(encodingStyle);
        typeMapping.register(BigInteger.class,
                Constants.XSD_UNSIGNEDLONG,
                new SimpleSerializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG),
                new SimpleDeserializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG));
View Full Code Here

            throw new BuildException( "No deploy WSDDs were specified!" );
        }

        try
        {
            AxisEngine axisEngine = new AxisServer( new FileProvider( m_configWsdd ) );
            m_msgContext = new MessageContext( axisEngine );
            m_axisAdmin = new Admin();
            for ( int i = 0; i < m_wsddFiles.size(); i++ )
            {
                deployWsdd( (File) m_wsddFiles.get( i ) );
View Full Code Here

                encodingStyle = org.apache.axis.Constants.URI_SOAP11_ENC;
            }
        }
        //register our type descriptors
        Service service = ((ServiceImpl) serviceImpl).getService();
        AxisEngine axisEngine = service.getEngine();
        TypeMappingRegistry typeMappingRegistry = axisEngine.getTypeMappingRegistry();
        TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(encodingStyle);
        typeMapping.register(BigInteger.class,
                Constants.XSD_UNSIGNEDLONG,
                new SimpleSerializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG),
                new SimpleDeserializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG));
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.