Package org.apache.axis.providers

Examples of org.apache.axis.providers.BasicProvider


   
    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
        String type;
        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.JavaProvider");
        Class _class = Class.forName(type);
        BasicProvider provider = (BasicProvider)_class.newInstance();
       
        // set the basic java provider deployment options
        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "provider").item(0);
        if (prov == null) {
            throw new WSDDException("The Java Provider requires the presence of a java:provider element in the WSDD");
        }
        provider.addOption(JavaProvider.OPTION_CLASSNAME, prov.getAttribute("className"));
        provider.addOption(JavaProvider.OPTION_IS_STATIC, new Boolean(prov.getAttribute("isStatic")));
       
        // set the classpath if present
        Element cp = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "classPath").item(0);
        if (cp != null) {
            provider.addOption(JavaProvider.OPTION_CLASSPATH, cp.getFirstChild().getNodeValue());
        }
       
        // collect the information about the operations
        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
        for (int n = 0; n < nl.getLength(); n++) {
            Element op = (Element)nl.item(n);
            provider.addOperation(op.getAttribute("name"),
                                  new QName(op.getAttribute("qName"),op));
        }
       
        return provider;
    }
View Full Code Here


 
    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
        String type;
        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.ComProvider");
        Class _class = Class.forName(type);
        BasicProvider provider = (BasicProvider)_class.newInstance();
       
        // set the basic java provider deployment options
        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_COM, "provider").item(0);
        if (prov == null) {
            throw new WSDDException("The Com Provider requires the presence of a com:provider element in the WSDD");
        }
        String option = prov.getAttribute("ProgID");
        if (!option.equals("")) provider.addOption(ComProvider.OPTION_PROGID, option);
        option = prov.getAttribute("CLSID");
        if (!option.equals("")) provider.addOption(ComProvider.OPTION_CLSID, option);
        option = prov.getAttribute("threadingModel");
        if (!option.equals("")) provider.addOption(ComProvider.OPTION_THREADING_MODEL, option);
       
        // collect the information about the operations
        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
        for (int n = 0; n < nl.getLength(); n++) {
            Element op = (Element)nl.item(n);
            provider.addOperation(op.getAttribute("name"),
                                  new QName(op.getAttribute("qName"),op));
        }
       
        return provider;
    }
View Full Code Here

   
    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
        String type;
        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.BSFProvider");
        Class _class = Class.forName(type);
        BasicProvider provider = (BasicProvider)_class.newInstance();
       
        // set the basic java provider deployment options
        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_BSF, "provider").item(0);
        if (prov == null) {
            throw new WSDDException("The BSF Provider requires the presence of a bsf:provider element in the WSDD");
        }
        String option = prov.getAttribute("language");
        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_LANGUAGE, option);
        option = prov.getAttribute("src");
        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_SRC, option);
        option = XMLUtils.getInnerXMLString(prov);
        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_SCRIPT, option);
       
        // collect the information about the operations
        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
        for (int n = 0; n < nl.getLength(); n++) {
            Element op = (Element)nl.item(n);
            provider.addOperation(op.getAttribute("name"),
                                  new QName(op.getAttribute("qName"),op));
        }
       
        return provider;
    }
View Full Code Here

                                       EngineConfiguration registry)
        throws Exception
    {
        Class _class = ClassUtils.forName("org.apache.axis.handlers.providers.ComProvider");

        BasicProvider provider = (BasicProvider) _class.newInstance();

        String option = service.getParameter("ProgID");

        if (!option.equals("")) {
            provider.setOption(ComProvider.OPTION_PROGID, option);
        }

        option = service.getParameter("CLSID");

        if (!option.equals("")) {
            provider.setOption(ComProvider.OPTION_CLSID, option);
        }

        option = service.getParameter("threadingModel");

        if (!option.equals("")) {
            provider.setOption(ComProvider.OPTION_THREADING_MODEL, option);
        }

        return provider;
    }
View Full Code Here

                                       EngineConfiguration registry)
        throws Exception
    {
        Class _class = ClassUtils.forName("org.apache.axis.handlers.providers.ComProvider");

        BasicProvider provider = (BasicProvider) _class.newInstance();

        String option = service.getParameter("ProgID");

        if (!option.equals("")) {
            provider.setOption(ComProvider.OPTION_PROGID, option);
        }

        option = service.getParameter("CLSID");

        if (!option.equals("")) {
            provider.setOption(ComProvider.OPTION_CLSID, option);
        }

        option = service.getParameter("threadingModel");

        if (!option.equals("")) {
            provider.setOption(ComProvider.OPTION_THREADING_MODEL, option);
        }

        return provider;
    }
View Full Code Here

   
    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
        String type;
        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.BSFProvider");
        Class _class = Class.forName(type);
        BasicProvider provider = (BasicProvider)_class.newInstance();
       
        // set the basic java provider deployment options
        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_BSF, "provider").item(0);
        if (prov == null) {
            throw new WSDDException("The BSF Provider requires the presence of a bsf:provider element in the WSDD");
        }
        String option = prov.getAttribute("language");
        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_LANGUAGE, option);
        option = prov.getAttribute("src");
        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_SRC, option);
        option = XMLUtils.getInnerXMLString(prov);
        if (!option.equals("")) provider.addOption(BSFProvider.OPTION_SCRIPT, option);
       
        // collect the information about the operations
        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
        for (int n = 0; n < nl.getLength(); n++) {
            Element op = (Element)nl.item(n);
            provider.addOperation(op.getAttribute("name"),
                                  new QName(op.getAttribute("qName"),op));
        }
       
        return provider;
    }
View Full Code Here

   
    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
        String type;
        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.JavaProvider");
        Class _class = Class.forName(type);
        BasicProvider provider = (BasicProvider)_class.newInstance();
       
        // set the basic java provider deployment options
        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "provider").item(0);
        if (prov == null) {
            throw new WSDDException("The Java Provider requires the presence of a java:provider element in the WSDD");
        }
        provider.addOption(JavaProvider.OPTION_CLASSNAME, prov.getAttribute("className"));
        provider.addOption(JavaProvider.OPTION_IS_STATIC, new Boolean(prov.getAttribute("isStatic")));
       
        // set the classpath if present
        Element cp = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_JAVA, "classPath").item(0);
        if (cp != null) {
            provider.addOption(JavaProvider.OPTION_CLASSPATH, cp.getFirstChild().getNodeValue());
        }
       
        // collect the information about the operations
        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
        for (int n = 0; n < nl.getLength(); n++) {
            Element op = (Element)nl.item(n);
            provider.addOperation(op.getAttribute("name"),
                                  new QName(op.getAttribute("qName"),op));
        }
       
        return provider;
    }
View Full Code Here

 
    public Handler newProviderInstance(DeploymentRegistry registry) throws Exception {
        String type;
        type = (!(type = getType()).equals("") ? type : "org.apache.axis.handlers.providers.ComProvider");
        Class _class = Class.forName(type);
        BasicProvider provider = (BasicProvider)_class.newInstance();
       
        // set the basic java provider deployment options
        Element prov = (Element)getElement().getElementsByTagNameNS(WSDDConstants.WSDD_COM, "provider").item(0);
        if (prov == null) {
            throw new WSDDException("The Com Provider requires the presence of a com:provider element in the WSDD");
        }
        String option = prov.getAttribute("ProgID");
        if (!option.equals("")) provider.addOption(ComProvider.OPTION_PROGID, option);
        option = prov.getAttribute("CLSID");
        if (!option.equals("")) provider.addOption(ComProvider.OPTION_CLSID, option);
        option = prov.getAttribute("threadingModel");
        if (!option.equals("")) provider.addOption(ComProvider.OPTION_THREADING_MODEL, option);
       
        // collect the information about the operations
        NodeList nl = getElement().getElementsByTagNameNS(WSDDConstants.WSDD_NS, "operation");
        for (int n = 0; n < nl.getLength(); n++) {
            Element op = (Element)nl.item(n);
            provider.addOperation(op.getAttribute("name"),
                                  new QName(op.getAttribute("qName"),op));
        }
       
        return provider;
    }
View Full Code Here

                                       EngineConfiguration registry)
        throws Exception
    {
        Class _class = ClassUtils.forName("org.apache.axis.providers.ComProvider");

        BasicProvider provider = (BasicProvider) _class.newInstance();

        String option = service.getParameter("ProgID");

        if (!option.equals("")) {
            provider.setOption(OPTION_PROGID, option);
        }

        option = service.getParameter("threadingModel");

        if (option!= null && !option.equals("")) {
            provider.setOption(OPTION_THREADING_MODEL, option);
        }

        return provider;
    }
View Full Code Here

    public void testGenerateWSDL() throws Exception {
       
        SOAPService soapService = server.getService(SERVICE_NAME);   

        BasicProvider provider = (BasicProvider) soapService.getPivotHandler();

        MessageContext mc = new MessageContext(server);
        mc.setService(soapService);
        mc.setProperty(MessageContext.TRANS_URL, "local");

        provider.generateWSDL(mc);

        Document wsdl = (Document) mc.getProperty("WSDL");
        assertNotNull( "cannot create WSDL", wsdl);
       
        Definition def = WSDLFactory.newInstance().newWSDLReader().readWSDL( null, wsdl);
View Full Code Here

TOP

Related Classes of org.apache.axis.providers.BasicProvider

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.