Package org.objectweb.celtix.common.i18n

Examples of org.objectweb.celtix.common.i18n.Message


            Element root = parse(is);
            jaxwsBindings.add(root);
        } else if (isValidJaxbBindingFile(reader)) {
            env.addJaxbBindingFile(bindingFile, is);
        } else {
            Message msg = new Message("UNKONW_BINDING_FILE", LOG, bindingFile);
            throw new ToolException(msg);
        }
    }
View Full Code Here


                    wsdlLocation = new File(basedir, wsdlLocation).getAbsolutePath();
                }
                wsdlLocation = ProcessorUtil.absolutize(ProcessorUtil.getFileOrURLName(wsdlLocation));
                   
                if (!StringUtils.getURL(wsdlURL).equals(StringUtils.getURL(wsdlLocation))) {
                    Message msg = new Message("NOT_POINTTO_URL", LOG, new Object[]{wsdlLocation, wsdlURL});
                    throw new ToolException(msg);
                }
            } else {
                return false;
            }
        } catch (MalformedURLException e) {
            Message msg = new Message("CAN_NOT_GET_WSDL_LOCATION", LOG);
            throw new ToolException(msg, e);
        }
        return true;
    }
View Full Code Here

    }

    public Configuration buildConfiguration(String namespaceUri, String id, Configuration parent) {
        ConfigurationMetadata model = getModel(namespaceUri);
        if (null == model) {
            throw new ConfigurationException(new Message("UNKNOWN_NAMESPACE_EXC", BUNDLE, namespaceUri));
        }
        /*
        if (parent != null && !isValidChildConfiguration(model, parent)) {
            throw new ConfigurationException(new Message("INVALID_CHILD_CONFIGURATION",
                                                         BUNDLE, namespaceUri,
                                                         parent.getModel().getNamespaceURI()));
        }
        */
        if (parent == null && !isValidTopConfiguration(model, parent)) {
            throw new ConfigurationException(new Message("INVALID_TOP_CONFIGURATION",
                                                         BUNDLE, namespaceUri));
        }

        Configuration c = new CeltixConfigurationImpl(model, id, parent);
        if (null == parent) {
View Full Code Here

           
            HandlerChainDocument doc = getHandlerChainDocument(hcAnn);
            HandlerChainType hc = doc.getChain(hcAnn.getChainName());
           
            if (null == hc) {
                throw new WebServiceException(new Message("CHAIN_NOT_SPECIFIED_EXC", LOG).toString());
            }

            chain =  buildHandlerChain(hc);
        }
        assert chain != null;
View Full Code Here

    
    private HandlerChainDocument getHandlerChainDocument(HandlerChainAnnotation hcAnn) {
        InputStream in = hcAnn.getDeclaringClass().getResourceAsStream(hcAnn.getFileName());

        if (null == in) {
            throw new WebServiceException(new Message("HANDLER_CFG_FILE_NOT_FOUND_EXC", LOG,
                                                      hcAnn.getFileName()).toString());
        }

        LOG.log(Level.INFO, "reading handler chain configuration from " + hcAnn.getFileName());
        return new HandlerChainDocument(in, true);
View Full Code Here

            return ann.name();
        }
       
        public void validate() {
            if (null == ann.file() || "".equals(ann.file())) {
                throw new WebServiceException(new Message("ANNOTATION_WITHOUT_URL_EXC", LOG).toString());  
            }
            if (null == ann.name() || "".equals(ann.name())) {
                LOG.fine("no handler name specified, defaulting to first declared");
            }
        }
View Full Code Here

        Endpoint ep = null;
        if (EndpointUtils.isValidImplementor(implementor)) {
            ep = new EndpointImpl(Bus.getCurrent(), implementor, bindingId);
            return ep;
        } else {
            throw new WebServiceException(new Message("INVALID_IMPLEMENTOR_EXC", LOG).toString());
        }
    }
View Full Code Here

                // deliberately ignore
                millis -= System.currentTimeMillis() - startedAt;
            }
        }
        if (!done) {
            throw new TimeoutException(new Message("ASYNC_HANDLER_TIMEDOUT_EXC",
                                                                    LOG).toString());
        }
    }
View Full Code Here

        if (o instanceof Element) {
            Element el = (Element)o;
            QName type = new QName(el.getNamespaceURI(), el.getLocalName());
            TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI());
            if (null == ts) {
                throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type));
            }
            try {
                return ts.unmarshal(type, el);
            } catch (JAXBException ex) {
                Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type);
                throw new ConfigurationException(msg, ex);
            }
        }

        return o;
View Full Code Here

        if (o instanceof Element) {
            Element el = (Element)o;
            QName type = new QName(el.getNamespaceURI(), el.getLocalName());
            TypeSchema ts = new TypeSchemaHelper(true).get(type.getNamespaceURI());
            if (null == ts) {
                throw new ConfigurationException(new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type));
            }
            try {
                return ts.unmarshal(type, el);
            } catch (JAXBException ex) {
                Message msg = new Message("JAXB_PROPERTY_EDITOR_EXC", LOG, type);
                throw new ConfigurationException(msg, ex);
            }
        }

        return o;
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.common.i18n.Message

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.