Package org.apache.cxf.service.factory

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


        if (FaultOutInterceptor.FaultInfoException.class.isAssignableFrom(exClass)) {
            try {
                Method m = exClass.getMethod("getFaultInfo");
                return m.getReturnType();
            } catch (SecurityException e) {
                throw new ServiceConstructionException(e);
            } catch (NoSuchMethodException e) {
                throw new ServiceConstructionException(e);
            }
        }

        return exClass;
    }
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);
                if (services.size() == 0) {
                    throw new ServiceConstructionException(
                        new Message("NO_SUCH_ENDPOINT_EXC", LOG, 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

            URIResolver resolver = new URIResolver(null, s, getClass());

            if (resolver.isResolved()) {
                return resolver.getURI().toURL();
            } else {
                throw new ServiceConstructionException(new Message("COULD_NOT_RESOLVE_URL", LOG, s));
            }
        } catch (IOException e) {
            throw new ServiceConstructionException(new Message("COULD_NOT_RESOLVE_URL", LOG, s), e);
        }
    }
View Full Code Here

                    server.destroy(); // prevent resource leak
                    throw re;
                }
            }
        } 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);
        } finally {
            if (origLoader != null) {
                origLoader.reset();
            }
        }
View Full Code Here

            return m;
        }
        try {
            return serviceObjectClass.getMethod("invoke", genericType);
        } catch (Exception e) {
            throw new ServiceConstructionException(e);
        }
    }
View Full Code Here

    @Override
    public void setServiceClass(Class<?> serviceClass) {
        if (serviceClass == null) {
            Message message = new Message("SERVICECLASS_MUST_BE_SET", LOG);
            throw new ServiceConstructionException(message);
        }
        setJaxWsImplementorInfo(new JaxWsImplementorInfo(serviceClass));
        super.setServiceClass(getJaxWsImplementorInfo().getEndpointClass());
        super.setServiceType(getJaxWsImplementorInfo().getSEIType());
    }
View Full Code Here

                                   asyncHandlerParams.toArray(new Class<?>[asyncHandlerParams.size()]));

            getMethodDispatcher().bind(op, method, responseMethod, futureMethod);

        } catch (SecurityException e) {
            throw new ServiceConstructionException(e);
        } catch (NoSuchMethodException e) {
            getMethodDispatcher().bind(op, method);
        }
    }
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.