Examples of Service


Examples of org.apache.aries.blueprint.annotation.Service

       
        return tref;
    }
   
    private Tservice generateTservice(Class clazz, String id, Map<String, TregistrationListener> reglMap) {
        Service service = (Service) clazz.getAnnotation(Service.class);
        Class<?>[] interfaces = service.interfaces();
        int ranking = service.ranking();
        String autoExport = service.autoExport();
        ServiceProperty[] serviceProperties = service.serviceProperties();
        RegistrationListener[] regListeners = service.registerationListeners();
       
        Tservice tservice = new Tservice();
       
        // can not think of configuring depends on for service
        tservice.setDependsOn(null);
View Full Code Here

Examples of org.apache.avalon.meta.info.Service

        for( int i = 0; i < size; i++ )
        {
            final JavaClass javaClass = (JavaClass)allClasses.get( i );
            if( javaClass.isInterface() )
            {
                Service service = new ServiceTag( javaClass ).getService();
                if( service == null )
                {
                    continue;
                }
View Full Code Here

Examples of org.apache.axis.client.Service

   */
  private static final byte[] obtainLicenseFile(Byte[] blowfishKey, Byte[] serverData) throws AxisFault
  {
    byte[] returnByteArray = null;
    try {
      Service service = new Service();

      Call call = (Call)service.createCall();
      call.setTargetEndpointAddress(new java.net.URL(WEB_SERVICE_URL));
      call.setOperationName(new QName("LicenseAdminSoapService", "obtainLicenseFile"));
      call.addParameter("arg1", XMLType.XSD_BASE64, ParameterMode.IN);
      call.addParameter("arg2", XMLType.XSD_BASE64, ParameterMode.IN);
      call.setReturnType(XMLType.XSD_BASE64);
View Full Code Here

Examples of org.apache.axis2.jaxws.rpclit.enumtype.sei.Service

  public void testEnumSimpleType(){
        TestLogger.logger.debug("------------------------------");
        TestLogger.logger.debug("Test : " + getName());
        try{
                Service service = new Service();
                PortType portType = service.getPort();
               
                BindingProvider p = (BindingProvider) portType;
                p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);

                Holder<ElementString> pString = new Holder<ElementString>(ElementString.A);
View Full Code Here

Examples of org.apache.axis2.rmi.deploy.config.Service

        configurator.addClassInfo(classInfo);



        Service[] services = new Service[2];
        services[0] = new Service();
        services[0].setServiceClass("Service1");

        services[1] = new Service();
        services[1].setServiceClass("Service2");

        Services testServices = new Services();
        testServices.setService(services);
        config.setServices(testServices);
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.Service

        this.configurationContext = configurationContext;
        this.configurator = configurator;
    }

    public void deployClass(Class serviceClass) throws AxisFault {
        Service service = new Service(serviceClass, this.configurator);
        try {
            service.populateMetaData();
            service.generateSchema();
            WSDL11DefinitionBuilder definitionBuilder = new WSDL11DefinitionBuilder(service);
            Definition definition = definitionBuilder.generateWSDL();

            WSDL11ToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(definition, null, null);
            AxisService axisService = builder.populateService();
            axisService.setClassLoader(this.classLoader);
            axisService.addParameter(new Parameter("useOriginalwsdl", "true"));
            axisService.addParameter(new Parameter("modifyUserWSDLPortAddress", "true"));
           
            List operations = service.getOperations();
            Operation operation = null;
            QName qName = null;
            AxisOperation axisOperation = null;
            RMIMessageReciever messageReciever = new RMIMessageReciever(service);
            for (Iterator iter = operations.iterator(); iter.hasNext();) {
View Full Code Here

Examples of org.apache.camel.Service

            CamelContextAware aware = (CamelContextAware) object;
            aware.setCamelContext(this);
        }

        if (object instanceof Service) {
            Service service = (Service) object;

            for (LifecycleStrategy strategy : lifecycleStrategies) {
                if (service instanceof Endpoint) {
                    // use specialized endpoint add
                    strategy.onEndpointAdd((Endpoint) service);
View Full Code Here

Examples of org.apache.catalina.Service

            supportedSessionTrackingModes.add(SessionTrackingMode.COOKIE);
        }

        // SSL not enabled by default as it can only used on its own
        // Context > Host > Engine > Service
        Service s = ((Engine) context.getParent().getParent()).getService();
        Connector[] connectors = s.findConnectors();
        // Need at least one SSL enabled connector to use the SSL session ID.
        for (Connector connector : connectors) {
            if (Boolean.TRUE.equals(connector.getAttribute("SSLEnabled"))) {
                supportedSessionTrackingModes.add(SessionTrackingMode.SSL);
                break;
View Full Code Here

Examples of org.apache.cxf.jaxws.schemavalidation.Service

    }
   
  
    @Test
    public void testSchemaValidationWithMultipleXsds() throws Exception {
        Service service = new Service();
        assertNotNull(service);

        ServicePortType greeter = service.getPort(portName, ServicePortType.class);
        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
        updateAddressPort(greeter, PORT);

        RequestIdType requestId = new RequestIdType();
View Full Code Here

Examples of org.apache.cxf.service.Service

        URL u = composeUrl(wsdlUrl);
        LOG.log(Level.FINE, "Creating client from URL " + u.toString());
        ClientImpl client = new ClientImpl(bus, u, service, port,
                                           getEndpointImplFactory());

        Service svc = client.getEndpoint().getService();
        //all SI's should have the same schemas
        Collection<SchemaInfo> schemas = svc.getServiceInfos().get(0).getSchemas();

        SchemaCompiler compiler = XJC.createSchemaCompiler();
        ErrorListener elForRun = new InnerErrorListener(wsdlUrl);
        compiler.setErrorListener(elForRun);
       
        ClassNameAllocator allocator
            = new ClassNameAllocatorImpl();

        compiler.setClassNameAllocator(allocator);

        addSchemas(wsdlUrl, schemas, compiler);
        addBindingFiles(bindingFiles, compiler);
        S2JJAXBModel intermediateModel = compiler.bind();
        JCodeModel codeModel = intermediateModel.generateCode(null, elForRun);
        StringBuilder sb = new StringBuilder();
        boolean firstnt = false;

        for (Iterator<JPackage> packages = codeModel.packages(); packages.hasNext();) {
            JPackage jpackage = packages.next();
            if (!isValidPackage(jpackage)) {
                continue;
            }
            if (firstnt) {
                sb.append(':');
            } else {
                firstnt = true;
            }
            sb.append(jpackage.name());
        }
        outputDebug(codeModel);
       
        String packageList = sb.toString();

        // our hashcode + timestamp ought to be enough.
        String stem = toString() + "-" + System.currentTimeMillis();
        File src = new File(tmpdir, stem + "-src");
        if (!src.mkdir()) {
            throw new IllegalStateException("Unable to create working directory " + src.getPath());
        }
        try {
            FileCodeWriter writer = new FileCodeWriter(src);
            codeModel.build(writer);
        } catch (IOException e) {
            throw new IllegalStateException("Unable to write generated Java files for schemas: "
                                            + e.getMessage(), e);
        }
        File classes = new File(tmpdir, stem + "-classes");
        if (!classes.mkdir()) {
            throw new IllegalStateException("Unable to create working directory " + src.getPath());
        }
        StringBuilder classPath = new StringBuilder();
        try {
            setupClasspath(classPath, classLoader);
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
       
        List<File> srcFiles = FileUtils.getFilesRecurse(src, ".+\\.java$");
        if (!compileJavaSrc(classPath.toString(), srcFiles, classes.toString())) {
            LOG.log(Level.SEVERE , new Message("COULD_NOT_COMPILE_SRC", LOG, wsdlUrl).toString());
        }
        FileUtils.removeDir(src);
        URLClassLoader cl;
        try {
            cl = new URLClassLoader(new URL[] {classes.toURI().toURL()}, classLoader);
        } catch (MalformedURLException mue) {
            throw new IllegalStateException("Internal error; a directory returns a malformed URL: "
                                            + mue.getMessage(), mue);
        }

        JAXBContext context;
        Map<String, Object> contextProperties = jaxbContextProperties;
       
        if (contextProperties == null) {
            contextProperties = Collections.emptyMap();
        }
       
        try {
            if (StringUtils.isEmpty(packageList)) {
                context = JAXBContext.newInstance(new Class[0], contextProperties);
            } else {
                context = JAXBContext.newInstance(packageList, cl, contextProperties);
            }
        } catch (JAXBException jbe) {
            throw new IllegalStateException("Unable to create JAXBContext for generated packages: "
                                            + jbe.getMessage(), jbe);
        }
        
        JAXBDataBinding databinding = new JAXBDataBinding();
        databinding.setContext(context);
        svc.setDataBinding(databinding);

        ServiceInfo svcfo = client.getEndpoint().getEndpointInfo().getService();

        // Setup the new classloader!
        Thread.currentThread().setContextClassLoader(cl);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.