Package org.uddi.api_v2

Examples of org.uddi.api_v2.SaveTModel


        //then the node SHOULD provide a chunkToken with results. 
        //TODO  If no more results are pending, the value of the chunkToken MUST be "0".

        public static void updateTModel(String authInfoMary, TModel saveMaryPublisherTmodel, UDDIPublicationPortType publicationMary) throws Exception {
                saveMaryPublisherTmodel.getDescription().add(new Description("a new description",null));
                SaveTModel stm = new SaveTModel();
                stm.setAuthInfo(authInfoMary);
                stm.getTModel().add(saveMaryPublisherTmodel);
                publicationMary.saveTModel(stm);
        }
View Full Code Here


         */
        public TModelDetail register(TModel tModel, Node node) {
                TModelDetail tModelDetail = null;
                log.info("Registering tModel with key " + tModel.getTModelKey());
                try {
                        SaveTModel saveTModel = new SaveTModel();
                        saveTModel.setAuthInfo(getAuthToken(node.getSecurityUrl()));
                        saveTModel.getTModel().add(tModel);
                        tModelDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveTModel(saveTModel);
                        if (log.isDebugEnabled()) {
                                log.debug("Registering tModel " + tModel.getTModelKey() + " completed.");
                        }
                } catch (Exception e) {
View Full Code Here

//this limit, or if the node determines based on its policy that there are too many entries to be returned in a single group,
        //then the node SHOULD provide a chunkToken with results. 
        //TODO  If no more results are pending, the value of the chunkToken MUST be "0".
        public static void updateTModel(String authInfoMary, TModel saveMaryPublisherTmodel, UDDIPublicationPortType publicationMary) throws Exception {
                saveMaryPublisherTmodel.getDescription().add(new Description("a new description", null));
                SaveTModel stm = new SaveTModel();
                stm.setAuthInfo(authInfoMary);
                stm.getTModel().add(saveMaryPublisherTmodel);
                publicationMary.saveTModel(stm);
        }
View Full Code Here

                tm.setCategoryBag(new CategoryBag());
                tm.setName(new Name("My Custom validated key", "en"));
                tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
                tm.getCategoryBag().getKeyedReference().add(
                        new KeyedReference(UDDIConstants.IS_VALIDATED_BY, UDDIConstants.IS_VALIDATED_BY_KEY_NAME, binding));
                SaveTModel stm = new SaveTModel();
                stm.setAuthInfo(authInfoJoe);
                stm.getTModel().add(tm);
                publication.saveTModel(stm);
        }
View Full Code Here

        //create a basic key gen
        @Test
        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("CreateKeyGenMaxLengthTest 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 = publicationJoe.saveTModel(st);
                DeleteTModel dm = new DeleteTModel();
                dm.setAuthInfo(authInfoJoe);
View Full Code Here

        //create a oversized tmodel keygen fail
        @Test(expected = SOAPFaultException.class)
        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("CreateKeyGenTooLongTest 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 = publicationJoe.saveTModel(st);
                        Assert.fail("request should have been rejected");
                } catch (SOAPFaultException ex) {
View Full Code Here

        //create a tmodel with a key gen defined valid, with oversized Name
        @Test(expected = SOAPFaultException.class)
        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("CreateKeyGenKeyDescriptionTooLongTest 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 = publicationJoe.saveTModel(st);
                        Assert.fail("request should have been rejected");
                } catch (SOAPFaultException ex) {
View Full Code Here

        @Test(expected = SOAPFaultException.class)
        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("CreateKeyGenKeyDescriptionTooLongTest 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 = publicationJoe.saveTModel(st);
                        Assert.fail("request should have been rejected");
                } catch (SOAPFaultException ex) {
View Full Code Here

        @Test(expected = SOAPFaultException.class)
        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("CreateKeyGenNameLangTooLongTest 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 = publicationJoe.saveTModel(st);
                        Assert.fail("request should have been rejected");
                } catch (SOAPFaultException ex) {
View Full Code Here

         */
        @Test(expected = SOAPFaultException.class)
        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("CreateTmodelnoKeyGen 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 = publicationJoe.saveTModel(st);
                        Assert.fail("request should have been rejected");
                } catch (SOAPFaultException ex) {
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.SaveTModel

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.