Package org.uddi.api_v2

Examples of org.uddi.api_v2.PublisherAssertion


    try {
      // Delete the entity and make sure it is removed
      DeletePublisherAssertions dp = new DeletePublisherAssertions();
      dp.setAuthInfo(authInfo);
     
      PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(pubassertXML, "org.uddi.api_v3");
      dp.getPublisherAssertion().add(paIn);
     
      publication.deletePublisherAssertions(dp);
    }
    catch(Exception e) {
View Full Code Here


  public void addPublisherAssertion(String authInfo, String pubassertXML) {
    try {
      AddPublisherAssertions ap = new AddPublisherAssertions();
      ap.setAuthInfo(authInfo);

      PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(pubassertXML, "org.uddi.api_v3");
      ap.getPublisherAssertion().add(paIn);
      publication.addPublisherAssertions(ap);
 
      // Now get the entity and check the values
      List<PublisherAssertion> paOutList = publication.getPublisherAssertions(authInfo);
      if (paOutList.size()==1) {
        PublisherAssertion paOut = paOutList.get(0);
 
        assertEquals(paIn.getFromKey(), paOut.getFromKey());
        assertEquals(paIn.getToKey(), paOut.getToKey());
       
        KeyedReference keyRefIn = paIn.getKeyedReference();
        KeyedReference keyRefOut = paOut.getKeyedReference();
       
        assertEquals(keyRefIn.getTModelKey(), keyRefOut.getTModelKey());
        assertEquals(keyRefIn.getKeyName(), keyRefOut.getKeyName());
        assertEquals(keyRefIn.getKeyValue(), keyRefOut.getKeyValue());
      }
View Full Code Here

    try {
      // Delete the entity and make sure it is removed
      DeletePublisherAssertions dp = new DeletePublisherAssertions();
      dp.setAuthInfo(authInfo);
     
      PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(pubassertXML, "org.uddi.api_v3");
      dp.getPublisherAssertion().add(paIn);
     
      publication.deletePublisherAssertions(dp);
    }
    catch(Exception e) {
View Full Code Here

        int currLoc = 0;
        while (iter.hasNext()) {
           
                Association association = (Association) iter.next();
                association.getSourceObject();
                PublisherAssertion pa = ScoutJaxrUddiV3Helper.getPubAssertionFromJAXRAssociation(association);
                sarr[currLoc] = pa;
                currLoc++;
           
                // Save PublisherAssertion
                PublisherAssertions bd = null;
                try {
                    bd = (PublisherAssertions) executeOperation(sarr, "SAVE_ASSOCIATION");
                }
                catch (RegistryV3Exception e) {
                    exceptions.add(new SaveException(e));
                    bulk.setExceptions(exceptions);
                    bulk.setStatus(JAXRResponse.STATUS_FAILURE);
                    return bulk;
                }
                if(bd != null)
                {
                  List<PublisherAssertion> publisherAssertionList = bd.getPublisherAssertion();
                  PublisherAssertion[] keyarr = new PublisherAssertion[publisherAssertionList.size()];
                  publisherAssertionList.toArray(keyarr);
                 
                  for (int i = 0; keyarr != null && i < keyarr.length; i++) {
                    PublisherAssertion result = (PublisherAssertion) keyarr[i];
                        KeyedReference keyr = result.getKeyedReference();
                        Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
                        c.setName(new InternationalStringImpl(keyr.getKeyName()));
                        c.setKey( new KeyImpl(keyr.getTModelKey()) );
                        c.setValue(keyr.getKeyValue());
                        association.setAssociationType(c);
View Full Code Here

        return token; 
    }

    private PublisherAssertion getPublisherAssertion(AssertionStatusItem asi)
    {
      PublisherAssertion pa = this.objectFactory.createPublisherAssertion();
       
      if(asi != null)
      {
            String sourceKey = asi.getFromKey();
            String targetKey = asi.getToKey();
       
            if (sourceKey != null) {
            pa.setFromKey(sourceKey);
            }
           
            if (targetKey != null) {
            pa.setToKey(targetKey);
            }
           
            KeyedReference keyr = asi.getKeyedReference();
           
            if (keyr != null) {
            pa.setKeyedReference(keyr);
            }
            //pa.setTModelKey(keyr.getTModelKey());
            //pa.setKeyName(keyr.getKeyName());
            //pa.setKeyValue(keyr.getKeyValue()); // -CBC- These are redundant?
       
View Full Code Here

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);

                        AddPublisherAssertions r = new AddPublisherAssertions();
                        r.setAuthInfo(authInfoJoe);
                        PublisherAssertion pa = new PublisherAssertion();
                        pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
                        pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
                        pa.setKeyedReference(new KeyedReference());
                        pa.getKeyedReference().setKeyName("Subsidiary");
                        pa.getKeyedReference().setKeyValue("parent-child");
                        pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
                        r.getPublisherAssertion().add(pa);
                        publicationJoe.addPublisherAssertions(r);

                        //approve it
                        r = new AddPublisherAssertions();
View Full Code Here

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);

                        AddPublisherAssertions r = new AddPublisherAssertions();
                        r.setAuthInfo(authInfoJoe);
                        PublisherAssertion pa = new PublisherAssertion();
                        pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
                        pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
                        pa.setKeyedReference(new KeyedReference());
                        pa.getKeyedReference().setKeyName("Subsidiary");
                        pa.getKeyedReference().setKeyValue("parent-child");

                        pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");

                        r.getPublisherAssertion().add(pa);
                        publicationJoe.addPublisherAssertions(r);

                        GetSubscriptionResults gsr = new GetSubscriptionResults();
View Full Code Here

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);

                        AddPublisherAssertions r = new AddPublisherAssertions();
                        r.setAuthInfo(authInfoJoe);
                        PublisherAssertion pa = new PublisherAssertion();
                        pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
                        pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
                        pa.setKeyedReference(new KeyedReference());
                        pa.getKeyedReference().setKeyName("Subsidiary");
                        pa.getKeyedReference().setKeyValue("parent-child");
                        pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
                        r.getPublisherAssertion().add(pa);
                        publicationJoe.addPublisherAssertions(r);


                        r = new AddPublisherAssertions();
                        r.setAuthInfo(authInfoSam);
                        pa = new PublisherAssertion();
                        pa.setFromKey(TckBusiness.JOE_BUSINESS_KEY);
                        pa.setToKey(TckBusiness.SAM_BUSINESS_KEY);
                        pa.setKeyedReference(new KeyedReference());
                        pa.getKeyedReference().setKeyName("Subsidiary");
                        pa.getKeyedReference().setKeyValue("parent-child");
                        pa.getKeyedReference().setTModelKey("uddi:uddi.org:relationships");
                        r.getPublisherAssertion().add(pa);
                        publicationJoe.addPublisherAssertions(r);


View Full Code Here

    @Test
    public void testSignPublisherAssertion() throws CertificateException {
        Default();
        System.out.println("testSignPublisherAssertion signing");
        PublisherAssertion be = new PublisherAssertion();
        be.setFromKey("uddi:juddi.apache.org:testkey");
        be.setToKey("uddi:juddi.apache.org:testkey");

        PublisherAssertion 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

                List<PublisherAssertion> r = new ArrayList<PublisherAssertion>();
                if (publisherAssertions == null) {
                        return r;
                }
                for (int i = 0; i < publisherAssertions.size(); i++) {
                        PublisherAssertion x = new PublisherAssertion();
                        x.setFromKey(publisherAssertions.get(i).getFromKey());
                        x.setToKey(publisherAssertions.get(i).getToKey());
                        if (publisherAssertions.get(i).getKeyedReference() != null) {
                                x.setKeyedReference(new KeyedReference(publisherAssertions.get(i).getKeyedReference().getTModelKey(),
                                     publisherAssertions.get(i).getKeyedReference().getKeyName(),
                                     publisherAssertions.get(i).getKeyedReference().getKeyValue()));
                        }
                        r.add(x);
                }
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.PublisherAssertion

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.