Package de.offis.faint.gui.facedb

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


    @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 {
View Full Code Here


    public void CreateKeyGenTooLongTest() throws DispositionReportFaultMessage, RemoteException {
        System.out.println("CreateKeyGenTooLongTest");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authInfoJoe);
        TModel tm = new TModel();
        tm.setName(new Name());
        tm.getName().setValue("My Cool Company Keymodel generator");
        tm.getName().setLang("en");
        tm.setCategoryBag(new CategoryBag());
        KeyedReference kr = new KeyedReference();
        kr.setTModelKey("uddi:uddi.org:categorization:types");
        kr.setKeyName("uddi-org:keyGenerator");
        kr.setKeyValue("keyGenerator");
        tm.getCategoryBag().getKeyedReference().add(kr);
        tm.setTModelKey(validTmodelKeyGenTooLong);
        st.getTModel().add(tm);
        try {
            @SuppressWarnings("unused")
      TModelDetail saveTModel = publication.saveTModel(st);
            Assert.fail("request should have been rejected");
View Full Code Here

    public void CreateKeyGenKeyDescriptionTooLongTest() throws DispositionReportFaultMessage, RemoteException {
        System.out.println("CreateKeyGenKeyDescriptionTooLongTest");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authInfoJoe);
        TModel tm = new TModel();
        tm.setName(new Name());
        tm.getName().setValue("Key gen name");
        tm.getName().setLang("en");
        Description d = new Description();
        d.setValue(str256);
        tm.getDescription().add(d);
        tm.setCategoryBag(new CategoryBag());
        KeyedReference kr = new KeyedReference();
        kr.setTModelKey("uddi:uddi.org:categorization:types");
        kr.setKeyName("uddi-org:keyGenerator");
        kr.setKeyValue("keyGenerator");
        tm.getCategoryBag().getKeyedReference().add(kr);
        tm.setTModelKey("uddi:uddi.joepublisher.com:mycustomkey");
        st.getTModel().add(tm);
        try {
          @SuppressWarnings("unused")
            TModelDetail saveTModel = publication.saveTModel(st);
            Assert.fail("request should have been rejected");
View Full Code Here

    public void CreateKeyGenKeyDescriptionLangTooLongTest() throws DispositionReportFaultMessage, RemoteException {
        System.out.println("CreateKeyGenKeyDescriptionTooLongTest");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authInfoJoe);
        TModel tm = new TModel();
        tm.setName(new Name());
        tm.getName().setValue("Key gen name");
        tm.getName().setLang("en");
        Description d = new Description();
        d.setValue("A description");
        d.setLang(str256);
        tm.getDescription().add(d);
        tm.setCategoryBag(new CategoryBag());
        KeyedReference kr = new KeyedReference();
        kr.setTModelKey("uddi:uddi.org:categorization:types");
        kr.setKeyName("uddi-org:keyGenerator");
        kr.setKeyValue("keyGenerator");
        tm.getCategoryBag().getKeyedReference().add(kr);
        String key = UUID.randomUUID().toString();
        tm.setTModelKey(key);
        st.getTModel().add(tm);
        try {
          @SuppressWarnings("unused")
            TModelDetail saveTModel = publication.saveTModel(st);
            Assert.fail("request should have been rejected");
View Full Code Here

    public void CreateKeyGenNameLangTooLongTest() throws DispositionReportFaultMessage, RemoteException {
        System.out.println("CreateKeyGenNameLangTooLongTest");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authInfoJoe);
        TModel tm = new TModel();
        tm.setName(new Name());
        tm.getName().setValue("hello world");
        tm.getName().setLang(str27);
        tm.setCategoryBag(new CategoryBag());
        KeyedReference kr = new KeyedReference();
        kr.setTModelKey("uddi:uddi.org:categorization:types");
        kr.setKeyName("uddi-org:keyGenerator");
        kr.setKeyValue("keyGenerator");
        tm.getCategoryBag().getKeyedReference().add(kr);
        tm.setTModelKey(validTmodelKeyGenTooLong);
        st.getTModel().add(tm);
        try {
          @SuppressWarnings("unused")
            TModelDetail saveTModel = publication.saveTModel(st);
            Assert.fail("request should have been rejected");
View Full Code Here

    public void CreateTmodelnoKeyGen() throws DispositionReportFaultMessage, RemoteException {
        System.out.println("CreateTmodelnoKeyGen");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authInfoJoe);
        TModel tm = new TModel();
        tm.setName(new Name());
        tm.getName().setValue("My Cool Company's tmodel");
        tm.getName().setLang("en");

        tm.setTModelKey("uddi:uddi.joepublisher.com:nokeygenerator:customkey");
        st.getTModel().add(tm);
        try {
          @SuppressWarnings("unused")
            TModelDetail saveTModel = publication.saveTModel(st);
            Assert.fail("request should have been rejected");
View Full Code Here

    @Test
    public void testSignTmodel() throws CertificateException {
        Default();
        System.out.println("testSignTmodel signing");
        TModel be = new TModel();
        be.setTModelKey("uddi:juddi.apache.org:testkey");

        be.getDescription().add(new Description("a description", "en"));
        be.setName(new Name("My biz", "en"));

        TModel signUDDI_JAXBObject = ds.signUddiEntity(be);
        Assert.assertNotSame("items are the same", be, signUDDI_JAXBObject);
        //System.out.println("verifing");
        AtomicReference<String> msg = new AtomicReference<String>();
        boolean verifySigned_UDDI_JAXB_Object = ds.verifySignedUddiEntity(signUDDI_JAXBObject, msg);
        if (verifySigned_UDDI_JAXB_Object) {
            //System.out.println("signature validation passed (expected)");
        } else {
            System.out.println("signature validation failed (not expected)");
            Assert.fail(msg.get());
        }
        validAllSignatureElementsArePresent(signUDDI_JAXBObject.getSignature());
    }
View Full Code Here

    public void CreateKeyGenMaxLengthTest() throws DispositionReportFaultMessage, RemoteException {
        System.out.println("CreateKeyGenMaxLengthTest");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authInfoJoe);
        TModel tm = new TModel();
        tm.setName(new Name());
        tm.getName().setValue("My Cool Company Keymodel generator");
        tm.getName().setLang("en");
        tm.setCategoryBag(new CategoryBag());
        KeyedReference kr = new KeyedReference();
        kr.setTModelKey("uddi:uddi.org:categorization:types");
        kr.setKeyName("uddi-org:keyGenerator");
        kr.setKeyValue("keyGenerator");
        tm.getCategoryBag().getKeyedReference().add(kr);
        tm.setTModelKey(validTmodelKeyGenMax);
        st.getTModel().add(tm);
       
        @SuppressWarnings("unused")
    TModelDetail saveTModel = publication.saveTModel(st);
        DeleteTModel dm = new DeleteTModel();
View Full Code Here

                Set<TModel> portTypeTModels = wsdl2UDDI.createWSDLPortTypeTModels(wsdlURL, portTypes);
                tModels.addAll(portTypeTModels);

                Assert.assertEquals(1, tModels.size());

                TModel tModel = tModels.iterator().next();
                System.out.println("UDDI PortType TModel " + tModel.getName().getValue());
                if (serialize) {
                        System.out.println(pTModel.print(tModel));
                }

                //now compare to the spec example
                String porttypeXml = "wsdl/uddiv3-xml/3_2_1_porttype.xml";
                TModel specTModel = (org.uddi.api_v3.TModel) EntityCreator.buildFromDoc(porttypeXml, EntityCreator.UDDIv3_Package);

                //making sure the names are the same
                Assert.assertEquals(specTModel.getName().getValue(), tModel.getName().getValue());
                //We should have a overviewDoc with one overviewURL which should end with "/sample.wsdl"
                Assert.assertNotNull(tModel.getOverviewDoc());
                Assert.assertEquals(1, tModel.getOverviewDoc().size());
                Assert.assertNotNull(tModel.getOverviewDoc().get(0).getOverviewURL());

                Assert.assertTrue(specTModel.getOverviewDoc().get(0).getOverviewURL().getValue().endsWith("/sample.wsdl"));
                Assert.assertTrue(tModel.getOverviewDoc().get(0).getOverviewURL().getValue().endsWith("/sample.wsdl"));

                //We should have a categoryBag with 2 keyedReferences
                Assert.assertNotNull(tModel.getCategoryBag());
                Assert.assertNotNull(tModel.getCategoryBag().getKeyedReference());
                Assert.assertEquals(2, tModel.getCategoryBag().getKeyedReference().size());
                for (KeyedReference keyedReference : tModel.getCategoryBag().getKeyedReference()) {
                        boolean match = false;
                        Iterator<KeyedReference> iter = specTModel.getCategoryBag().getKeyedReference().iterator();
                        while (iter.hasNext() && match == false) {
                                KeyedReference specKeyedRef = iter.next();
                                if (specKeyedRef.getTModelKey().equals(keyedReference.getTModelKey())) {
                                        match = true;
                                        Assert.assertEquals(specKeyedRef.getKeyName(), keyedReference.getKeyName());
View Full Code Here

                Set<TModel> tModels = wsdl2UDDI.createWSDLBindingTModels(wsdlURL, bindings);

                //Now check
                Assert.assertEquals(1, tModels.size());

                TModel tModel = tModels.iterator().next();
                System.out.println("UDDI Binding TModel " + tModel.getName().getValue());
                if (serialize) {
                        System.out.println(pTModel.print(tModel));
                }

                //Compare to the spec example
                String bindingtmodelXml = "wsdl/uddiv3-xml/3_2_2_bindingtmodel.xml";
                TModel specTModel = (org.uddi.api_v3.TModel) EntityCreator.buildFromDoc(bindingtmodelXml, EntityCreator.UDDIv3_Package);

                //Make sure the names are the same
                Assert.assertEquals(specTModel.getName().getValue(), tModel.getName().getValue());
                //We should have a overviewDoc with one overviewURL which should end with "/sample.wsdl"
                Assert.assertNotNull(tModel.getOverviewDoc());
                Assert.assertEquals(1, tModel.getOverviewDoc().size());
                Assert.assertNotNull(tModel.getOverviewDoc().get(0).getOverviewURL());

                //We should have a categoryBag with 6 keyedReferences
                Assert.assertNotNull(tModel.getCategoryBag());
                Assert.assertNotNull(tModel.getCategoryBag().getKeyedReference());
                Assert.assertEquals(6, tModel.getCategoryBag().getKeyedReference().size());
                for (KeyedReference keyedReference : tModel.getCategoryBag().getKeyedReference()) {
                        boolean match = false;
                        Iterator<KeyedReference> iter = specTModel.getCategoryBag().getKeyedReference().iterator();
                        while (iter.hasNext() && match == false) {
                                KeyedReference specKeyedRef = iter.next();
                                if (specKeyedRef.getTModelKey().equals(keyedReference.getTModelKey())) {
                                        match = true;
                                        Assert.assertEquals(specKeyedRef.getKeyName(), keyedReference.getKeyName());
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.