Package org.apache.cxf.service.factory

Examples of org.apache.cxf.service.factory.ServiceConstructionException


            Endpoint ep = createEndpoint();
           
            createClient(ep);
            initializeAnnotationInterceptors(ep, getServiceClass());
        } catch (EndpointException e) {
            throw new ServiceConstructionException(e);
        } catch (BusException e) {
            throw new ServiceConstructionException(e);
        }
        applyFeatures();
        return client;
    }
View Full Code Here


            bindingFactory = mgr.getBindingFactory(binding);
           
            return bindingFactory.createBindingInfo(serviceFactory.getService(),
                                                    binding, bindingConfig);
        } catch (BusException ex) {
            throw new ServiceConstructionException(
                   new Message("COULD.NOT.RESOLVE.BINDING", LOG, bindingId), ex);
        }
    }
View Full Code Here

           
            if (start) {
                server.start();
            }
        } catch (EndpointException e) {
            throw new ServiceConstructionException(e);
        } catch (BusException e) {
            throw new ServiceConstructionException(e);
        } catch (IOException e) {
            throw new ServiceConstructionException(e);
        }
       
        if (serviceBean != null) {
            initializeAnnotationInterceptors(server.getEndpoint(), this.getServiceBean().getClass());
        }
View Full Code Here

                if (url == null) {
                    URIResolver res;
                    try {
                        res = new URIResolver(l);
                    } catch (IOException e) {
                        throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL", LOG), e);
                    }
                   
                    if (!res.isResolved()) {
                        throw new ServiceConstructionException(new Message("INVALID_SCHEMA_URL", LOG));
                    }
                    url = res.getURL();
                }
               
                Document d;
                try {
                    d = DOMUtils.readXml(url.openStream());
                } catch (Exception e) {
                    throw new ServiceConstructionException(
                        new Message("ERROR_READING_SCHEMA", LOG, l), e);
                }
                schemas.add(new DOMSource(d, url.toString()));
            }
           
View Full Code Here

        try {
            // use wsdl manager to parse wsdl or get cached definition
            definition = getBus().getExtension(WSDLManager.class).getDefinition(wsdlUrl);
        } catch (WSDLException ex) {
            throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG), ex);
        }

    }
View Full Code Here

        setBus(b);
        try {
            // use wsdl manager to parse wsdl or get cached definition
            definition = getBus().getExtension(WSDLManager.class).getDefinition(url);
        } catch (WSDLException ex) {
            throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG), ex);
        }
    }
View Full Code Here

        setBus(b);
        try {
            // use wsdl manager to parse wsdl or get cached definition
            definition = getBus().getExtension(WSDLManager.class).getDefinition(url);
        } catch (WSDLException ex) {
            throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG), ex);
        }

        serviceName = sn;
    }
View Full Code Here

        List<ServiceInfo> services;
        if (serviceName == null) {
            try {
                services = new WSDLServiceBuilder(getBus()).buildServices(definition);
            } catch (XmlSchemaException ex) {
                throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG), ex);
            }
            if (services.size() == 0) {
                throw new ServiceConstructionException(new Message("NO_SERVICE_EXC", LOG));
            } else {
                //@@TODO  - this isn't good, need to return all the services
                serviceName = services.get(0).getName();
                //get all the service info's that match that first one.
                Iterator<ServiceInfo> it = services.iterator();
                while (it.hasNext()) {
                    if (!it.next().getName().equals(serviceName)) {
                        it.remove();
                    }
                }
            }
        } else {
            javax.wsdl.Service wsdlService = definition.getService(serviceName);
            if (wsdlService == null) {
                throw new ServiceConstructionException(new Message("NO_SUCH_SERVICE_EXC", LOG, serviceName));
            }
            try {
                services = new WSDLServiceBuilder(getBus()).buildServices(definition,
                                                                          wsdlService,
                                                                          endpointName);
            } catch (XmlSchemaException ex) {
                throw new ServiceConstructionException(new Message("SERVICE_CREATION_MSG", LOG), ex);
            }
        }
        ServiceImpl service = new ServiceImpl(services);
        setService(service);
        return service;
View Full Code Here

            checkPrivateEndpoint(ep);
            if (start) {
                server.start();
            }
        } catch (EndpointException e) {
            throw new ServiceConstructionException(e);
        } catch (BusException e) {
            throw new ServiceConstructionException(e);
        } catch (IOException e) {
            throw new ServiceConstructionException(e);
        } catch (Exception e) {
            throw new ServiceConstructionException(e);
        }

        applyFeatures();
        return server;
    }
View Full Code Here

        try {
            JAXBContext ctx =
                JAXBContext.newInstance(PackageUtils.getPackageName(create), create.getClassLoader());
            dataBinding = new JAXBDataBinding(ctx);
        } catch (JAXBException e) {
            throw new ServiceConstructionException(e);
        }
        service.setDataBinding(dataBinding);
        service.setInvoker(servant);
        services.put(protocol, service);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.service.factory.ServiceConstructionException

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.