Package org.apache.axis

Examples of org.apache.axis.ConfigurationException


        if (pivotQName != null) {
            if (URI_WSDD_JAVA.equals(pivotQName.getNamespaceURI())) {
                try {
                    pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance();
                } catch (InstantiationException e) {
                    throw new ConfigurationException(e);
                } catch (IllegalAccessException e) {
                    throw new ConfigurationException(e);
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException(e);
                }
            } else {
                pivot = registry.getHandler(pivotQName);
            }
        }
View Full Code Here


        /*
         * If the basepath is not a readable directory, throw an internal
         * exception to make it easier to debug setup problems.
         */
        if (!dir.isDirectory() || !dir.canRead()) {
            throw new ConfigurationException(Messages.getMessage
                                             ("invalidConfigFilePath",
                                              basepath));
        }

        configFile = new File(basepath, filename);
View Full Code Here

                        setInputStream(ClassUtils.getResourceAsStream(engine.getClass(), filename));
                }
            }

            if (getInputStream() == null) {
                throw new ConfigurationException(
                        Messages.getMessage("noConfigFile"));
            }

            WSDDDocument doc = new WSDDDocument(XMLUtils.
                                                newDocument(getInputStream()));
            deployment = doc.getDeployment();

            deployment.configureEngine(engine);
            engine.refreshGlobalOptions();

            setInputStream(null);
        } catch (Exception e) {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

                writer.close();
                FileOutputStream fos = new FileOutputStream(configFile);
                fos.write(writer.getBuffer().toString().getBytes());
                fos.close();
            } catch (Exception e) {
                throw new ConfigurationException(e);
            }
        }
    }
View Full Code Here

        Handler h = null;

        try {
            c = getJavaClass();
        } catch (ClassNotFoundException e) {
            throw new ConfigurationException(e);
        }

        if (c != null) {
            try {
                h = (Handler)createInstance(c);
            } catch (Exception e) {
                throw new ConfigurationException(e);
            }

            if (h != null) {
                if ( qname != null )
                  h.setName(qname.getLocalPart());
                h.setOptions(getParametersTable());
                try{
                  h.init();
                }catch(Exception e){
                    String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
                    log.debug(msg);
                    throw new ConfigurationException(e);
                }catch(Error e){
                    String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
                    log.debug(msg);
                    throw new ConfigurationException(msg);
                }
            }
        } else {
            // !!! Should never get here!
            h = registry.getHandler(getType());
View Full Code Here

        Handler h = null;

        try {
            c = getJavaClass();
        } catch (ClassNotFoundException e) {
            throw new ConfigurationException(e);
        }

        if (c != null) {
            try {
                h = (Handler)createInstance(c);
            } catch (Exception e) {
                throw new ConfigurationException(e);
            }

            if (h != null) {
                if ( qname != null )
                  h.setName(qname.getLocalPart());
                h.setOptions(getParametersTable());
                try{
                  h.init();
                }catch(Exception e){
                    String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
                    log.debug(msg);
                    throw new ConfigurationException(e);
                }catch(Error e){
                    String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
                    log.debug(msg);
                    throw new ConfigurationException(msg);
                }
            }
        } else {
            // !!! Should never get here!
            h = registry.getHandler(getType());
View Full Code Here

                                       EngineConfiguration registry)
        throws Exception
    {
        String providerClass = service.getParameter("handlerClass");
        if (providerClass == null) {
            throw new ConfigurationException(Messages.getMessage("noHandlerClass00"));
        }
       
        Class _class = ClassUtils.forName(providerClass);
       
        if (!(Handler.class.isAssignableFrom(_class))) {
            throw new ConfigurationException(Messages.getMessage("badHandlerClass00",
                                                       _class.getName()));
        }

        return (Handler)_class.newInstance();
    }
View Full Code Here

            try {
                providerHandler = WSDDProvider.getInstance(providerQName,
                                                           this,
                                                           registry);
            } catch (Exception e) {
                throw new ConfigurationException(e);
            }
            if (providerHandler == null)
                throw new WSDDException(
                          Messages.getMessage("couldntConstructProvider00"));
        }

        Handler respHandler = null;
        WSDDChain response = getResponseFlow();

        if (response != null) {
            respHandler = response.getInstance(registry);
        }

        SOAPService service = new SOAPService(reqHandler, providerHandler,
                                              respHandler);
        service.setStyle(style);
        service.setHighFidelityRecording(!streaming);
        service.setSendType(sendType);

        if ( getQName() != null )
            service.setName(getQName().getLocalPart());
        service.setOptions(getParametersTable());

        service.setEngine(((WSDDDeployment)registry).getEngine());

        if (style != Style.RPC) {
            // No Multirefs/xsi:types
            service.setOption(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
            service.setOption(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
        }

  // Set handlerInfoChain
  if (_wsddHIchain != null) {
            HandlerInfoChainFactory hiChainFactory = _wsddHIchain.getHandlerChainFactory();

      service.setOption(Constants.ATTR_HANDLERINFOCHAIN, hiChainFactory);
  }

        AxisEngine.normaliseOptions(service);
        tmr.delegate(registry.getTypeMappingRegistry());

        WSDDFaultFlow [] faultFlows = getFaultFlows();
        if (faultFlows != null && faultFlows.length > 0) {
            FaultableHandler wrapper = new FaultableHandler(service);
            for (int i = 0; i < faultFlows.length; i++) {
                WSDDFaultFlow flow = faultFlows[i];
                Handler faultHandler = flow.getInstance(registry);
                wrapper.setOption("fault-" + flow.getQName().getLocalPart(),
                                  faultHandler);
            }
        }

        service.setServiceDescription(desc);
        try {
            service.getInitializedServiceDesc(MessageContext.getCurrentContext());
        } catch (AxisFault axisFault) {
            throw new ConfigurationException(axisFault);
        }

        cachedService = service;
        return service;
    }
View Full Code Here

        /*
         * If the basepath is not a readable directory, throw an internal
         * exception to make it easier to debug setup problems.
         */
        if (!dir.isDirectory() || !dir.canRead()) {
            throw new ConfigurationException(JavaUtils.getMessage
                                             ("invalidConfigFilePath",
                                              basepath));
        }

        configFile = new File(basepath, filename);
View Full Code Here

                        myInputStream = ClassUtils.getResourceAsStream(engine.getClass(), filename);
                }
            }

            if (myInputStream == null) {
                throw new ConfigurationException(
                        JavaUtils.getMessage("noConfigFile"));
            }

            WSDDDocument doc = new WSDDDocument(XMLUtils.
                                                newDocument(myInputStream));
            deployment = doc.getDeployment();

            deployment.configureEngine(engine);
            engine.refreshGlobalOptions();

            myInputStream = null;
        } catch (Exception e) {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis.ConfigurationException

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.