Package de.offis.faint.gui.facedb

Examples of de.offis.faint.gui.facedb.PersonPanel$TModel


                //first some setup
                reset();
               
               
               
                TModel createKeyGenator = UDDIClerk.createKeyGenator("somebusiness", "A test key domain SubscriptionCallbackTest1", "SubscriptionCallbackTest1");
                Assert.assertNotNull(createKeyGenator);
                clerk.register(createKeyGenator);
                logger.info("Registered tModel keygen: " + createKeyGenator.getTModelKey());

                //setup the business to attach to
                BusinessEntity be = new BusinessEntity();
                be.setBusinessKey("uddi:somebusiness:somebusinesskey");
                be.getName().add(new Name("somebusiness SubscriptionCallbackTest1", null));
                be.setBusinessServices(new BusinessServices());
                BusinessService bs = new BusinessService();
                bs.setBusinessKey("uddi:somebusiness:somebusinesskey");
                bs.setServiceKey("uddi:somebusiness:someservicekey");
                bs.getName().add(new Name("service SubscriptionCallbackTest1", null));
                be.getBusinessServices().getBusinessService().add(bs);
                BusinessEntity register = clerk.register(be);
                logger.info("Registered business keygen: " + register.getBusinessKey());

                //start up our listener
                BindingTemplate start = SubscriptionCallbackListener.start(manager, "default");
                Assert.assertNotNull(start);

                if (TckCommon.isDebug()) {
                        PrintUDDI<BindingTemplate> p = new PrintUDDI<BindingTemplate>();
                        logger.info(p.print(start));
                }

                //register for callbacks
                SubscriptionCallbackListener.registerCallback(this);

                Subscription sub = new Subscription();

                sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(1000));
                sub.setBindingKey(start.getBindingKey());
                sub.setSubscriptionFilter(new SubscriptionFilter());
                sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name(UDDIConstants.WILDCARD, null));

                Subscription subscription = clerk.register(sub, clerk.getUDDINode().getApiNode());
                if (TckCommon.isDebug()) {
                        PrintUDDI<Subscription> p2 = new PrintUDDI<Subscription>();
                        logger.info(p2.print(subscription));
                }
                Assert.assertNotNull(subscription);
                Assert.assertNotNull(subscription.getBindingKey());
                Assert.assertNotNull(subscription.getSubscriptionKey());
                logger.info("Registered subscription key: " + (subscription.getSubscriptionKey()) + " bindingkey: " + subscription.getBindingKey());

                //fetch the business just to verify binding registration
                BusinessEntity businessDetail = clerk.getBusinessDetail("uddi:somebusiness:somebusinesskey");
                Assert.assertNotNull(businessDetail);
                Assert.assertNotNull(businessDetail.getBusinessKey());
                Assert.assertNotNull(businessDetail.getBusinessServices());
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0));
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0).getBindingTemplates());
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0).getBindingTemplates().getBindingTemplate().get(0));
                if (TckCommon.isDebug()) {
                        PrintUDDI<BusinessEntity> p2 = new PrintUDDI<BusinessEntity>();
                        logger.info(p2.print(businessDetail));
                }

                //trigger the callback
                BusinessEntity trigger = new BusinessEntity();
                trigger.getName().add(new Name("somebusiness trigger SubscriptionCallbackTest1", null));
                BusinessEntity triggered = clerk.register(trigger);
                //wait up to 30 seconds or until we get something
                long wait = TckPublisher.getSubscriptionTimeout();
                while (wait > 0 && notifications == 0) {
                        Thread.sleep(1000);
                        System.out.print(".");
                        wait--;
                }

                logger.info("Callback check." + notifications);
                //Thread.sleep(2000);
                SubscriptionCallbackListener.stop(manager, "default", start.getBindingKey());
                clerk.unRegisterSubscription(subscription.getSubscriptionKey());
                clerk.unRegisterTModel(createKeyGenator.getTModelKey());

                clerk.unRegisterBusiness(triggered.getBusinessKey());
                clerk.unRegisterBusiness(businessDetail.getBusinessKey());
                //verify
                logger.info("Callback check." + notifications);
View Full Code Here


    // Reading the WSDL
    Definition wsdlDefinition = rw.readWSDL("bpel/bpel-technote.wsdl");
   
      @SuppressWarnings("unchecked")
    Map<QName,PortType> portTypes= (Map<QName,PortType>) wsdlDefinition.getAllPortTypes();
      TModel bpel4WSTModel = bpel2UDDI.createBPEL4WSProcessTModel(serviceName, targetNamespace, portTypes, bpelOverViewUrl);
     
    System.out.println("***** BPEL4WS Process TModel: " + bpel4WSTModel.getName().getValue());
                if (serialize)
    System.out.println(pTModel.print(bpel4WSTModel));
   
    Assert.assertNotNull(bpel4WSTModel);
  }
View Full Code Here

    // Reading the WSDL
    Definition wsdlDefinition = rw.readWSDL("bpel/HelloWorld.wsdl");
   
      @SuppressWarnings("unchecked")
    Map<QName,PortType> portTypes= (Map<QName,PortType>) wsdlDefinition.getAllPortTypes();
      TModel bpel4WSTModel = bpel2UDDI.createBPEL4WSProcessTModel(serviceName, targetNamespace, portTypes, bpelOverViewUrl);
     
    System.out.println("***** BPEL4WS Process TModel: " + bpel4WSTModel.getName().getValue());
                if (serialize)
    System.out.println(pTModel.print(bpel4WSTModel));
   
    Assert.assertNotNull(bpel4WSTModel);
  }
View Full Code Here

                logger.info("Fetching " + httpGet.getURI());
                HttpResponse response = client.execute(httpGet);
               
                Assert.assertTrue(response.getStatusLine().getStatusCode() == 200);
                logger.info("Response content: " + response.getEntity().getContent());
                TModel unmarshal = JAXB.unmarshal(response.getEntity().getContent(), TModel.class);
                client.getConnectionManager().shutdown();
                Assert.assertNotNull(unmarshal);
                Assert.assertEquals(unmarshal.getTModelKey(), findTModel.getTModelInfos().getTModelInfo().get(0).getTModelKey());


        }
View Full Code Here

        public static org.uddi.api_v3.TModel MapTModel(org.uddi.api_v2.TModel be) {
                if (be == null) {
                        return null;
                }
                TModel item = new org.uddi.api_v3.TModel();
                item.setTModelKey(be.getTModelKey());
                item.setName(new Name(be.getName().getValue(), be.getName().getLang()));
                item.setCategoryBag(MapCategoryBag(be.getCategoryBag()));
                item.setIdentifierBag(MapIdentBag(be.getIdentifierBag()));
                item.getDescription().addAll(MapDescription(be.getDescription()));
                OverviewDoc MapOverviewDoc = MapOverviewDoc(be.getOverviewDoc());
                if (MapOverviewDoc != null) {
                        item.getOverviewDoc().add(MapOverviewDoc);
                }
                return item;
        }
View Full Code Here

        Assert.assertNotNull(app);
        List<URL> urls = WADL2UDDI.getBaseAddresses(app);
        URL url = urls.get(0);
        String domain = url.getHost();
        PrintUDDI<TModel> tmodelPrinter = new PrintUDDI<TModel>();
        TModel keygen = UDDIClerk.createKeyGenator("uddi:" + domain + ":keygenerator", domain, "en");
        //save the keygen
        SaveTModel stm = new SaveTModel();
        stm.getTModel().add(keygen);
        if (serialize) {
            System.out.println(tmodelPrinter.print(keygen));
View Full Code Here

        Assert.assertNotNull(app);
        List<URL> urls = WADL2UDDI.getBaseAddresses(app);
        URL url = urls.get(0);
        String domain = url.getHost();
        PrintUDDI<TModel> tmodelPrinter = new PrintUDDI<TModel>();
        TModel keygen = UDDIClerk.createKeyGenator("uddi:" + domain + ":keygenerator", domain, "en");
        //save the keygen
        SaveTModel stm = new SaveTModel();
        stm.getTModel().add(keygen);
        if (serialize) {
            System.out.println(tmodelPrinter.print(keygen));
View Full Code Here

        @Test()
        public void JUDDI_712_SaveTModelWithSignature() throws CertificateException {
                SaveTModel sb = new SaveTModel();
                sb.setAuthInfo(authInfoJoe);
                DigSigUtil ds = GetDigSig();
                TModel bs = new TModel();
                bs.setName(new Name("Joe's Tmodel", null));
                bs = ds.signUddiEntity(bs);

                sb.getTModel().add(bs);
                try {
                        publicationJoe.saveTModel(sb);
View Full Code Here

        String failuremsg = "";
        System.out.println("JUDDI_571_Part3_Test");
        SaveTModel sb = new SaveTModel();
        sb.setAuthInfo(authInfoJoe);
        TModel be = new TModel();
        Name n = new Name();
        n.setValue("JUDDI_571_Part3_Test no lang");
        be.setName(n);
        sb.getTModel().add(be);

        be = new TModel();
        n = new Name();
        n.setValue("JUDDI_571_Part3_Test lang");
        n.setLang("en");
        be.setName(n);
        sb.getTModel().add(be);

        try {
            TModelDetail saveTModel = publication.saveTModel(sb);
            businesskeysToDelete.add(saveTModel.getTModel().get(0).getTModelKey());
View Full Code Here

        String failuremsg = "";
        System.out.println("JUDDI_574");
        SaveTModel sb = new SaveTModel();
        sb.setAuthInfo(authInfoJoe);
        TModel be = new TModel();
        Name n = new Name();
        n.setValue("JUDDI_574");
        n.setLang("en");
        be.setName(n);
        sb.getTModel().add(be);

        try {
            TModelDetail saveTModel = publication.saveTModel(sb);
            businesskeysToDelete.add(saveTModel.getTModel().get(0).getTModelKey());
View Full Code Here

TOP

Related Classes of de.offis.faint.gui.facedb.PersonPanel$TModel

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.