Package org.apache.juddi.v3.client.cryptor

Examples of org.apache.juddi.v3.client.cryptor.DigSigUtil


                bt.setBindingKey(null);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bs = ds.signUddiEntity(bs);

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

                sb.getBusinessEntity().add(be);
View Full Code Here


                bt.setBindingKey(null);
                bt.setServiceKey(TckBusinessService.JOE_SERVICE_KEY);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bs = ds.signUddiEntity(bs);

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

                sb.getBusinessEntity().add(be);
View Full Code Here

                bt.setBindingKey(TckBusinessService.JOE_BINDING_KEY_1);
                bt.setServiceKey(null);
                bt.setAccessPoint(new AccessPoint("http://localhost", "wsdl"));
                bs.getBindingTemplates().getBindingTemplate().add(bt);
                bs.getName().add(new Name("Joe's bs", null));
                DigSigUtil ds = GetDigSig();
                bs = ds.signUddiEntity(bs);

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

                sb.getBusinessEntity().add(be);
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);
                        Assert.fail("unexpected success");
View Full Code Here

                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);
View Full Code Here

                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);
View Full Code Here

                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);
View Full Code Here

                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);

                try {
                        SaveBinding sb1 = new SaveBinding();
                        sb1.setAuthInfo(authInfoJoe);
View Full Code Here

                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);
                BusinessDetail saveBusiness = null;
                try {
                        saveBusiness = publicationJoe.saveBusiness(sb);
                        GetBusinessDetail gsb = new GetBusinessDetail();
                        gsb.setAuthInfo(authInfoJoe);
                        gsb.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
                        BusinessDetail businessDetail = inquiryJoe.getBusinessDetail(gsb);
                        PrintUDDI<BusinessEntity> printer = new PrintUDDI<BusinessEntity>();
                        System.out.println(printer.print(businessDetail.getBusinessEntity().get(0)));
                        AtomicReference<String> msg = new AtomicReference<String>();
                        boolean b = ds.verifySignedUddiEntity(businessDetail.getBusinessEntity().get(0), msg);
                        Assert.assertTrue(msg.get(), b);
                        Assert.assertTrue(msg.get() == null || msg.get().length() == 0);

                } catch (Exception ex) {
                        logger.error("unExpected failure: ", ex);
View Full Code Here

                be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);

                Name n = new Name();
                n.setValue("JUDDI_716_SaveBusinessAllOptions");
                be.getName().add(n);
                DigSigUtil ds = GetDigSig();
                ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SERIAL, "true");
                ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SUBJECTDN, "true");
                be = ds.signUddiEntity(be);
                sb.getBusinessEntity().add(be);
                BusinessDetail saveBusiness = null;
                try {
                        saveBusiness = publicationJoe.saveBusiness(sb);
                        GetBusinessDetail gsb = new GetBusinessDetail();
                        gsb.setAuthInfo(authInfoJoe);
                        gsb.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
                        BusinessDetail businessDetail = inquiryJoe.getBusinessDetail(gsb);
                        PrintUDDI<BusinessEntity> printer = new PrintUDDI<BusinessEntity>();
                        System.out.println(printer.print(businessDetail.getBusinessEntity().get(0)));
                        AtomicReference<String> msg = new AtomicReference<String>();
                        boolean b = ds.verifySignedUddiEntity(businessDetail.getBusinessEntity().get(0), msg);
                        Assert.assertTrue(msg.get(), b);
                        Assert.assertTrue(msg.get() == null || msg.get().length() == 0);

                } catch (Exception ex) {
                        logger.error("unExpected failure: ", ex);
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.cryptor.DigSigUtil

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.