Package org.uddi.api_v2

Examples of org.uddi.api_v2.SaveTModel


                }
        }

        @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);
                        Assert.fail("unexpected success");
                } catch (Exception ex) {
                        logger.info("Expected failure: " + ex.getMessage());
View Full Code Here


        List<String> businesskeysToDelete = new ArrayList<String>();

        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());
            businesskeysToDelete.add(saveTModel.getTModel().get(1).getTModelKey());
View Full Code Here

        List<String> businesskeysToDelete = new ArrayList<String>();

        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());
            System.out.println("tmodel created with key " + saveTModel.getTModel().get(0).getTModelKey());
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 {
            publication.saveTModel(sb);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
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("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();
        dm.setAuthInfo(authInfoJoe);
View Full Code Here

    //create a oversized tmodel keygen fail
    @Test(expected=ValueNotAllowedException.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("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");
        } catch (ValueNotAllowedException ex) {
View Full Code Here

    //create a tmodel with a key gen defined valid, with oversized Name
    @Test(expected=ValueNotAllowedException.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("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");
        } catch (ValueNotAllowedException ex) {
View Full Code Here

    @Test(expected=ValueNotAllowedException.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("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");
        } catch (ValueNotAllowedException ex) {
View Full Code Here

    @Test(expected=ValueNotAllowedException.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("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");
        } catch (ValueNotAllowedException ex) {
View Full Code Here

    //create a tmodel without a key gen defined- fail
    @Test(expected=InvalidKeyPassedException.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("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");
        } catch (ValueNotAllowedException 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.