Package org.uddi.api_v3

Examples of org.uddi.api_v3.SaveBusiness


        }
    }

    @Test()
    public void JUDDI_712_SaveService4BTWithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_712_SaveService4BTWithSignature");
        be.getName().add(n);
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
        } catch (Exception ex) {
            logger.info("UnExpected failure: ", ex);
            Assert.fail();
        }

        SaveService ss = new SaveService();
        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
        bt.setServiceKey(null);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bt = ds.signUddiEntity(bt);
        bs.getBindingTemplates().getBindingTemplate().add(bt);
        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);


        sb.getBusinessEntity().add(be);
        try {
            publication.saveService(ss);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
View Full Code Here


        }
    }

    @Test()
    public void JUDDI_712_SaveService5BTWithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_712_SaveService5BTWithSignature");
        be.getName().add(n);
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
        } catch (Exception ex) {
            logger.info("UnExpected failure: ", ex);
            Assert.fail();
        }

        SaveService ss = new SaveService();
        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(null);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bt = ds.signUddiEntity(bt);
        bs.getBindingTemplates().getBindingTemplate().add(bt);
        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);


        sb.getBusinessEntity().add(be);
        try {
            publication.saveService(ss);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
View Full Code Here

        }
    }

    @Test()
    public void JUDDI_712_SaveService6BTWithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_712_SaveService6BTWithSignature");
        be.getName().add(n);
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
        } catch (Exception ex) {
            logger.info("UnExpected failure: ", ex);
            Assert.fail();
        }

        SaveService ss = new SaveService();
        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.setBindingTemplates(new BindingTemplates());
        BindingTemplate bt = new BindingTemplate();
        bt.setBindingKey(null);
        bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));

        bs.getName().add(new Name("Joe's bs", null));
        DigSigUtil ds = GetDigSig();
        bt = ds.signUddiEntity(bt);
        bs.getBindingTemplates().getBindingTemplate().add(bt);
        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);


        sb.getBusinessEntity().add(be);
        try {
            publication.saveService(ss);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
View Full Code Here

        }
    }

    @Test()
    public void JUDDI_712_SaveBusinessWithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_712_SaveBindingWithSignature");
        be.getName().add(n);
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
        } catch (Exception ex) {
            logger.info("UnExpected failure: ", ex);
            Assert.fail();
        }

        SaveService ss = new SaveService();
        ss.setAuthInfo(authInfoJoe);
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
        bs.getName().add(new Name("joe's service", null));


        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);


        sb.getBusinessEntity().add(be);
        ServiceDetail saveService = null;
        ss.getBusinessService().add(bs);
        try {
            saveService = publication.saveService(ss);
        } catch (Exception ex) {
View Full Code Here

        }
    }

    @Test()
    public void JUDDI_716_SaveBusinessWithSignatureX509IssuerSerial() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
               
        Name n = new Name();
        n.setValue("JUDDI_716_SaveBusinessWithSignatureX509IssuerSerial");
        be.getName().add(n);
        DigSigUtil ds = GetDigSig();
        ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SERIAL, "true");
        be = ds.signUddiEntity(be);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            GetBusinessDetail gsb=new GetBusinessDetail();
            gsb.setAuthInfo(authInfoJoe);
            gsb.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
View Full Code Here

        //find business with lang defined, expecting one result
        //find business without lang defined, expecting 2 results
        List<String> businesskeysToDelete = new ArrayList<String>();
        String failuremsg = "";
        System.out.println("JUDDI_JIRA_571_Part1_Test");
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_JIRA_571_Part1_Test no lang");
        be.getName().add(n);
        sb.getBusinessEntity().add(be);

        be = new BusinessEntity();
        n = new Name();
        n.setValue("JUDDI_JIRA_571_Part1_Test with lang");
        n.setLang("en");
        be.getName().add(n);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            businesskeysToDelete.add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
            businesskeysToDelete.add(saveBusiness.getBusinessEntity().get(1).getBusinessKey());
View Full Code Here

        List<String> businesskeysToDelete = new ArrayList<String>();
        List<String> targetServiceKeys = new ArrayList<String>();
        String failuremsg = "";
        System.out.println("JUDDI_JIRA_571_Part2_Test");
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_JIRA_571_Part2_Test no lang");
        be.getName().add(n);
        sb.getBusinessEntity().add(be);

        BusinessService bs = new BusinessService();
        n = new Name();
        n.setValue("Service1 No Lang");
        bs.getName().add(n);
View Full Code Here

        return ds;
    }

    @Test()
    public void JUDDI_712_SaveBusinessProjectionWithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_JUDDI_712_SaveBusinessProjectionWithSignature");
        be.getName().add(n);
        DigSigUtil ds = GetDigSig();
        be = ds.signUddiEntity(be);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
View Full Code Here

        }
    }

    @Test()
    public void JUDDI_712_SaveBusinessProjectionNoServiceKeyWithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_712_SaveBusinessProjectionNoServiceKeyWithSignature");
        be.getName().add(n);
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);

        //service has neither business or service key
        BusinessService bs = new BusinessService();
        bs.getName().add(new Name("Joe's bs", null));
        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);

        DigSigUtil ds = GetDigSig();
        be = ds.signUddiEntity(be);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
View Full Code Here

        }
    }

    @Test()
    public void JUDDI_712_SaveBusinessProjectionNoServiceKey2WithSignature() throws CertificateException {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfoJoe);
        BusinessEntity be = new BusinessEntity();
        Name n = new Name();
        n.setValue("JUDDI_712_SaveBusinessProjectionNoServiceKey2WithSignature");
        be.getName().add(n);
        be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);

        //service has business but not service key
        BusinessService bs = new BusinessService();
        bs.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
        bs.getName().add(new Name("Joe's bs", null));
        be.setBusinessServices(new BusinessServices());
        be.getBusinessServices().getBusinessService().add(bs);

        DigSigUtil ds = GetDigSig();
        be = ds.signUddiEntity(be);
        sb.getBusinessEntity().add(be);
        try {
            BusinessDetail saveBusiness = publication.saveBusiness(sb);
            Assert.fail("unexpected success");
        } catch (Exception ex) {
            logger.info("Expected failure: " + ex.getMessage());
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.SaveBusiness

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.