Package org.uddi.api_v3

Examples of org.uddi.api_v3.OperationalInfo


        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());
      }
     
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
View Full Code Here


      for (String string : findQualifyers) {
        findQualifiers.getFindQualifier().add(string);
      }
      findBusiness.setFindQualifiers(findQualifiers);

      Name name = new Name();
      name.setValue(nameStr);
      findBusiness.getName().add(name);


      logger.debug("FindBusiness " + findBusiness + " sending findBusinesses request..");
      List<Business> businesses = new ArrayList<Business>();
View Full Code Here

        @Override
        public OperationalInfos getOperationalInfo(GetOperationalInfo body) throws DispositionReportFaultMessage, RemoteException {
                OperationalInfos ret = new OperationalInfos();

                for (int i = 0; i < body.getEntityKey().size(); i++) {
                        OperationalInfo oi = new OperationalInfo();
                        oi.setEntityKey(body.getEntityKey().get(i));
                        try {
                                org.uddi.api_v2.GetBusinessDetail businessDetail = new org.uddi.api_v2.GetBusinessDetail();
                                businessDetail.setGeneric(VERSION);
                                businessDetail.getBusinessKey().add(body.getEntityKey().get(i));
                                org.uddi.api_v2.BusinessDetail z = inquiryService.getBusinessDetail(businessDetail);
                                oi.setNodeID(z.getOperator());
                                oi.setAuthorizedName(z.getBusinessEntity().get(0).getAuthorizedName());
                        } catch (Exception ex) {
                        }
                        if (oi.getAuthorizedName() != null) {
                                continue;
                        }
                        try {
                                org.uddi.api_v2.GetTModelDetail tModelDetail = new org.uddi.api_v2.GetTModelDetail();
                                tModelDetail.setGeneric(VERSION);
                                tModelDetail.getTModelKey().add(body.getEntityKey().get(i));
                                org.uddi.api_v2.TModelDetail z = inquiryService.getTModelDetail(tModelDetail);
                                oi.setNodeID(z.getOperator());
                                oi.setAuthorizedName(z.getTModel().get(0).getAuthorizedName());
                        } catch (Exception ex) {
                        }
                        if (oi.getAuthorizedName() != null) {
                                continue;
                        }
                        try {
                                //get the service
                                org.uddi.api_v2.GetServiceDetail serviceDetail = new org.uddi.api_v2.GetServiceDetail();
                                serviceDetail.setGeneric(VERSION);
                                serviceDetail.getServiceKey().add(body.getEntityKey().get(i));
                                org.uddi.api_v2.ServiceDetail z = inquiryService.getServiceDetail(serviceDetail);
                                oi.setNodeID(z.getOperator());

                                org.uddi.api_v2.GetBusinessDetail businessDetail = new org.uddi.api_v2.GetBusinessDetail();
                                businessDetail.setGeneric(VERSION);
                                //its owning business
                                businessDetail.getBusinessKey().add(z.getBusinessService().get(0).getBusinessKey());
                                org.uddi.api_v2.BusinessDetail z2 = inquiryService.getBusinessDetail(businessDetail);
                                oi.setNodeID(z.getOperator());
                                oi.setAuthorizedName(z2.getBusinessEntity().get(0).getAuthorizedName());
                        } catch (Exception ex) {
                        }
                        ret.getOperationalInfo().add(oi);
                        ret.setTruncated(false);
                }
View Full Code Here

        @Test(expected = WebApplicationException.class)
        public void testGetOpInfoJSON_NULL() {
                System.out.println("getOpInfoJSON_NULL");
                String id = UUID.randomUUID().toString();

                OperationalInfo expResult = null;
                OperationalInfo result = instance.getOpInfoJSON(id);

        }
View Full Code Here

        @Test
        public void testGetOpInfoJSON() {
                System.out.println("getOpInfoJSON");
                String id = UUID.randomUUID().toString();

                OperationalInfo expResult = null;
                OperationalInfo result = instance.getOpInfoJSON(JUDDI_BIZ);
                Assert.assertNotNull(result);
                Assert.assertNotNull(result.getAuthorizedName());
                Assert.assertNotNull(result.getEntityKey());
                Assert.assertNotNull(result.getNodeID());

        }
View Full Code Here

        @Test(expected = WebApplicationException.class)
        public void testGetOpInfoXML_NULL() {
                System.out.println("getOpInfoXML_NULL");
                String id = UUID.randomUUID().toString();

                OperationalInfo expResult = null;
                OperationalInfo result = instance.getOpInfoXML(id);

        }
View Full Code Here

        @Test
        public void testGetOpInfoXML() {
                System.out.println("getOpInfoXML");
                String id = UUID.randomUUID().toString();

                OperationalInfo expResult = null;
                OperationalInfo result = instance.getOpInfoXML(JUDDI_BIZ);
                Assert.assertNotNull(result);
                Assert.assertNotNull(result.getAuthorizedName());
                Assert.assertNotNull(result.getEntityKey());
                Assert.assertNotNull(result.getNodeID());

        }
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

    try {
      FindRelatedBusinesses body = (FindRelatedBusinesses)EntityCreator.buildFromDoc(FIND_RELATED_BUSINESS_SORT_BY_NAME_XML, "org.uddi.api_v3");
      RelatedBusinessesList result = inquiry.findRelatedBusinesses(body);
      if (result == null)
        Assert.fail("Null result from find related business operation");
      RelatedBusinessInfos bInfos = result.getRelatedBusinessInfos();
   
      //both parties need to register the assertion for it to be live.
      if (isOneSided) {
        Assert.assertNull(bInfos);
      } else {
        List<RelatedBusinessInfo> biList = bInfos.getRelatedBusinessInfo();
        if (bInfos == null)
          Assert.fail("No result from find related business operation");
        if (biList == null || biList.size() == 0)
          Assert.fail("No result from find related business operation");
        Set<String> keys = new HashSet<String>();
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.OperationalInfo

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.