Examples of ServiceReference


Examples of com.dotcms.repackage.org.osgi.framework.ServiceReference

        //Initializing services...
        initializeServices( context );

        //Service reference to ExtHttpService that allows us to register servlets and filters
        ServiceReference serviceReference = context.getServiceReference( ExtHttpService.class.getName() );

        if ( serviceReference != null ) {

            //Publish bundle services
            publishBundleServices( context );
View Full Code Here

Examples of com.hellblazer.slp.ServiceReference

        }
        List<ServiceReference> references;
        listeners.add(new ListenerRegistration(listener, new Filter(query)));
        references = getServiceReferences(null, query);
        for (ServiceReference reference : references) {
            final ServiceReference ref = reference;
            executor.execute(new Runnable() {
                @Override
                public void run() {
                    try {
                        listener.serviceChanged(new ServiceEvent(
View Full Code Here

Examples of fr.adrienbrault.idea.symfony2plugin.dic.ServiceReference

                    if(phpDocParamTag.getTagValue().contains("#Entity")) {
                        psiReferences.add(new EntityReference(psiElement));
                    }

                    if(phpDocParamTag.getTagValue().contains("#Service")) {
                        psiReferences.add(new ServiceReference(psiElement));
                    }

                    if(phpDocParamTag.getTagValue().contains("#TranslationDomain")) {
                        psiReferences.add(new TranslationDomainReference(psiElement));
                    }
View Full Code Here

Examples of org.eclipse.wst.wsi.internal.core.analyzer.ServiceReference

    // Get the definition element
    Definition definition = wsdlDocument.getDefinitions();

    // Get service reference from analyzer context
    ServiceReference serviceReference = analyzerContext.getServiceReference();

    // Create normalized data about the service under test.
    CandidateInfo candidate = new CandidateInfo(serviceReference, wsdlDocument);

    analyzerContext.setCandidateInfo(candidate);

    // Set prereq type to entry container
    reporter.setPrereqType(Reporter.PREREQ_TYPE_ENTRY_CONTAINER);

    // always process Import, Definitions & Types assertions
    // TEMP:
    if (processDefAssertions)
    {
      processDefinitionAssertions(classPrefix, candidate);
      processTypesAssertions(classPrefix, candidate);
      processImportAssertions(classPrefix, candidate);
    }

    // Process the element hierarchy in the WSDL document starting with the one that was specified 
    // FIX: Element finding already completed by CandidateInfo constructor - so use that rather than retest here 

    // ---------------------------
    // wsdl:port
    // ---------------------------
    if (serviceReference.getWSDLElement().isPort())
    {
      // Find the service element
      if ((service =
        definition.getService(
          serviceReference.getWSDLElement().getParentElementQName()))
        == null)
      {
        throw new WSIRuntimeException(
          "Could not locate WSDL service: "
            + serviceReference.getWSDLElement().getParentElementName());
      }

      // Find the port element
      if ((port = service.getPort(serviceReference.getWSDLElement().getName()))
        == null)
      {
        throw new WSIRuntimeException(
          "Could not locate WSDL port: "
            + serviceReference.getWSDLElement().getName());
      }

      // TEMP: Remove until there are port test assertions     
      //processPortAssertions(port, serviceReference, classPrefix, wsdlDocument);      

      // Next, process the binding
      if (((binding = port.getBinding()) == null) || (binding.isUndefined()))
      {
        //throw new WSIRuntimeException("Could not locate WSDL binding for port: " + port.getName()); 
        // Set missingInput for all binding, portType, operation and message test assertions
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_BINDING));
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_PORTTYPE));
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_OPERATION));
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_MESSAGE));
      }

      else
      {
        processBindingAssertions(
          binding,
          serviceReference,
          classPrefix,
          wsdlDocument);

        // Next, process the portType
        if (((portType = binding.getPortType()) == null)
          || (portType.isUndefined()))
        {
          //throw new WSIRuntimeException("Could not locate WSDL portType for binding: " + binding.getQName().getLocalPart());
          // Set missingInput for all portType, operation and message test assertions
          setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_PORTTYPE));
          setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_OPERATION));
          setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_MESSAGE));
        }

        else
        {
          processMessageAssertions(
            binding,
            serviceReference,
            classPrefix,
            wsdlDocument);
          processPortTypeAssertions(
            portType,
            serviceReference,
            classPrefix,
            wsdlDocument);
          processOperationAssertions(
            portType,
            serviceReference,
            classPrefix,
            wsdlDocument);
          processMessageAssertions(
            portType,
            serviceReference,
            classPrefix,
            wsdlDocument);
        }
      }

    }

    // ---------------------------
    // wsdl:binding
    // ---------------------------
    else if (serviceReference.getWSDLElement().isBinding())
    {
      WSDLElement wsdlElement = serviceReference.getWSDLElement();
      // Find the binding element
      if (wsdlElement.getQName() != null
        && wsdlElement.getQName().getLocalPart() != null
        && wsdlElement.getQName().getLocalPart().length() > 0)
      {
        if (((binding =
          definition.getBinding(serviceReference.getWSDLElement().getQName()))
          == null)
          || (binding.isUndefined()))
        {
          throw new WSIRuntimeException(
            "Could not locate WSDL binding: "
              + serviceReference.getWSDLElement().getName());
        }

        processBindingAssertions(
          binding,
          serviceReference,
          classPrefix,
          wsdlDocument);
        processMessageAssertions(
          binding,
          serviceReference,
          classPrefix,
          wsdlDocument);

        // Next, process the portType
        if (((portType = binding.getPortType()) == null)
          || (portType.isUndefined()))
        {
          //throw new WSIRuntimeException("Could not locate WSDL PortType for Binding: " + binding.getQName().getLocalPart());

          // Set missingInput for all portType, operation and message test assertions
          setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_PORTTYPE));
          setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_OPERATION));
          setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_MESSAGE));
        }

        else
        {
          processPortTypeAssertions(
            portType,
            serviceReference,
            classPrefix,
            wsdlDocument);
          processOperationAssertions(
            portType,
            serviceReference,
            classPrefix,
            wsdlDocument);

          // Process each message within each operation of the portType associated with the binding
          processMessageAssertions(
            portType,
            serviceReference,
            classPrefix,
            wsdlDocument);
        }
      }

      // There was a problem with the binding element specification.  This can
      // happen when a UDDI tModel did not have a valid binding reference.
      else
      {
        // Set missingInput for all binding, portType, operation and message test assertions
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_BINDING));
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_PORTTYPE));
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_OPERATION));
        setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_MESSAGE));
      }
    }

    // ---------------------------
    // wsdl:portType
    // ---------------------------
    else if (serviceReference.getWSDLElement().isPortType())
    {
      // Find the PortType element
      if (((portType =
        definition.getPortType(serviceReference.getWSDLElement().getQName()))
        == null)
        || (portType.isUndefined()))
      {
        throw new WSIRuntimeException(
          "Could not locate WSDL PortType: "
            + serviceReference.getWSDLElement().getName());
      }

      // Set missingInput for all binding test assertions
      setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_BINDING));

      processPortTypeAssertions(
        portType,
        serviceReference,
        classPrefix,
        wsdlDocument);
      processOperationAssertions(
        portType,
        serviceReference,
        classPrefix,
        wsdlDocument);

      // Process each message within each operation of the portType
      processMessageAssertions(
        portType,
        serviceReference,
        classPrefix,
        wsdlDocument);
    }

    // ---------------------------
    // wsdl:operation
    // ---------------------------
    else if (serviceReference.getWSDLElement().isOperation())
    {
      // Find the operation
      // get portType from config parent element
      if (((portType =
        definition.getPortType(
          serviceReference.getWSDLElement().getParentElementQName()))
        == null)
        || (portType.isUndefined()))
      {
        throw new WSIRuntimeException(
          "Could not locate WSDL portType: "
            + serviceReference.getWSDLElement().getParentElementQName());
      }

      if (((operation =
        getOperationFromPortType(
          portType,
          serviceReference.getWSDLElement().getName()))
        == null)
        || (operation.isUndefined()))
      {
        throw new WSIRuntimeException(
          "Could not locate WSDL Operation: "
            + serviceReference.getWSDLElement().getName()
            + "in portType: "
            + portType.getQName());
      }

      // Set missingInput for all binding and portType test assertions
      setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_BINDING));
      setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_PORTTYPE));

      processOperationAssertions(
        operation,
        portType,
        serviceReference,
        classPrefix,
        wsdlDocument);
      processMessageAssertions(
        operation,
        serviceReference,
        classPrefix,
        wsdlDocument);
    }

    // ---------------------------
    // wsdl:message
    // ---------------------------
    else if (serviceReference.getWSDLElement().isMessage())
    {
      // Find the message
      if (((message =
        definition.getMessage(serviceReference.getWSDLElement().getQName()))
        == null)
        || (message.isUndefined()))
      {
        throw new WSIRuntimeException(
          "Could not locate WSDL Message: "
            + serviceReference.getWSDLElement().getName());
      }

      // Set missingInput for all binding, portType, and operation test assertions
      setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_BINDING));
      setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_PORTTYPE));
      setMissingInput(EntryType.getEntryType(TYPE_DESCRIPTION_OPERATION));

      processMessageAssertions(
        message,
        serviceReference,
        classPrefix,
        wsdlDocument);
    }

    else
    {
      throw new WSIRuntimeException(
        "The following WSDL type is not supported: "
          + serviceReference.getWSDLElement().getType());
    }

    // Cleanup
    cleanup();
  }
View Full Code Here

Examples of org.oasisopen.sca.ServiceReference

        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference)requestContext.getServiceReference();
            serviceRef.setCallback(serviceRef);
        } catch (ClassCastException goodEx) {
            exceptionProduced = true;
            System.out.println("Test10 appropriate exception caught during setCallback to own service reference");
        } catch (Exception badEx) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + badEx.toString());
View Full Code Here

Examples of org.osgi.framework.ServiceReference

  }

  private IProxyService loadProxyService() {
    Bundle bundle = Platform.getBundle(CORE_NET_BUNDLE);
    if (bundle != null) {
      ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
      if (ref != null)
        return (IProxyService) bundle.getBundleContext().getService(ref);
    }

    if (fProxyService == null)
View Full Code Here

Examples of org.osgi.framework.ServiceReference

  }

  private IProxyService loadProxyService() {
    Bundle bundle = Platform.getBundle(CORE_NET_BUNDLE); //$NON-NLS-1$
    if (bundle != null) {
      ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
      if (ref != null)
        return (IProxyService) bundle.getBundleContext().getService(ref);
    }

    if (fProxyService == null)
View Full Code Here

Examples of org.osgi.framework.ServiceReference

        {
            try
            {
                if (resourcesService == null)
                {
                    ServiceReference serviceReference =
                        VersionActivator.bundleContext
                        .getServiceReference(
                                ResourceManagementService.class.getName());

                    if(serviceReference == null)
View Full Code Here

Examples of org.osgi.framework.ServiceReference

     */
    public TestFailSafeTransaction(String name)
    {
        super(name);
        BundleContext context = FileAccessServiceLick.bc;
        ServiceReference ref = context
                .getServiceReference(FileAccessService.class.getName());
        this.fileAccessService = (FileAccessService) context.getService(ref);
    }
View Full Code Here

Examples of org.osgi.framework.ServiceReference

    sb.append("<td width=\"100%\" colspan=3>");
    sb.append(fontify(e.getMessage()));
    sb.append("</td>");
    sb.append("</tr>");

    ServiceReference sr = e.getServiceReference();
    if (null!=sr) {
      sb.append("<tr bgcolor=\"#eeeeee\">");
      sb.append("<td width=\"100%\" colspan=\"3\">");
      sb.append(fontify("Service Properties"));
      sb.append("</td>");
      sb.append("</tr>");
      String[] propKeys = sr.getPropertyKeys();
      for (int i=0; i<propKeys.length; i++) {
        // Reuse service reference properties presentation form the
        // services tab.
        StringWriter sw = new StringWriter();
        PrintWriter  pr = new PrintWriter(sw);
        try {
          org.knopflerfish.bundle.desktop.swing.Util
            .printObject(pr, sr.getProperty(propKeys[i]));
        } catch (IOException ioe) {
        }

        sb.append("<tr>");
        sb.append("<td valign=top align=left>" +fontify(propKeys[i]) +"</td>");
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.