Package org.uddi.api_v3

Examples of org.uddi.api_v3.SaveService


        } 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) {
            //logger.error("unExpected failure: ",ex);
            Assert.fail("unexpected failure " + ex.getMessage() + ex.toString());
View Full Code Here


                        return null;
                }
                log.info("Registering service " + service.getName().get(0).getValue()
                        + " with key " + service.getServiceKey());
                try {
                        SaveService saveService = new SaveService();
                        saveService.setAuthInfo(getAuthToken(node.getSecurityUrl()));
                        saveService.getBusinessService().add(service);
                        ServiceDetail serviceDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveService(saveService);
                        businessService = serviceDetail.getBusinessService().get(0);
                        if (log.isDebugEnabled()) {
                                log.debug("Registering service " + service.getName().get(0).getValue() + " completed.");
                        }
View Full Code Here

                        sb.setAuthInfo(token);
                        sb.getBusinessEntity().add(be);
                        BusinessDetail saveBusiness = publish.saveBusiness(sb);
                        System.out.println("new business created, key = " + saveBusiness.getBusinessEntity().get(0).getBusinessKey());
                }
                SaveService ss = new SaveService();
                ss.setAuthInfo(token);
                businessServices.setBusinessKey(businessKey);
                ss.getBusinessService().add(businessServices);
                publish.saveService(ss);
                System.out.println("Saved! " + businessServices.getServiceKey());

                //and we're done
                //Be sure to report any problems to the jUDDI JIRA bug tracker at
View Full Code Here

                        System.out.println("new business created key= " + businessKey);
                }

                //finaly, we're ready to save all of the services defined in the WSDL
                //again, we're creating a new business, if you have one already, look it up using the Inquiry getBusinessDetails
                SaveService ss = new SaveService();
                ss.setAuthInfo(token);
                for (int i = 0; i < businessServices.getBusinessService().size(); i++) {
                        businessServices.getBusinessService().get(i).setBusinessKey(businessKey);
                        ss.getBusinessService().add(businessServices.getBusinessService().get(i));

                }

                System.out.println("Here's our new service(s): " + new PrintUDDI<SaveService>().print(ss));
View Full Code Here

  public void saveTModel(String authInfo, String tModelXml, String tModelKey) {
   
    // Add the tModel
    try {
      SaveTModel st = new SaveTModel();
      st.setAuthInfo(authInfo);

      org.uddi.api_v3.TModel tmIn = (org.uddi.api_v3.TModel)EntityCreator.buildFromDoc(tModelXml, "org.uddi.api_v3");
      st.getTModel().add(tmIn);
      publication.saveTModel(st);
 
      // Now get the entity and check the values
      GetTModelDetail gt = new GetTModelDetail();
      gt.getTModelKey().add(tModelKey);
View Full Code Here

      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
      ServiceDetail sd = inquiry.getServiceDetail(gs);
      List<BusinessService> bsOutList = sd.getBusinessService();
      BusinessService bsOut = bsOutList.get(0);

      assertEquals(bsIn.getServiceKey(), bsOut.getServiceKey());
     
      TckValidator.checkNames(bsIn.getName(), bsOut.getName());
View Full Code Here

     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
      gs.getServiceKey().add(serviceKey2);
      ServiceDetail sd = inquiry.getServiceDetail(gs);
      List<BusinessService> bsOutList = sd.getBusinessService();
      int size = bsOutList.size();

      assertEquals(2, size);
     
     
View Full Code Here

    InquiryResponse response = new InquiryResponse();
    logger.debug("ServiceDetail " + getServiceDetail + " sending serviceDetail request..");
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           UDDIInquiryPortType inquiryService = transport.getUDDIInquiryService();
           ServiceDetail serviceDetail = inquiryService.getServiceDetail(getServiceDetail);
           for (BusinessService businessService : serviceDetail.getBusinessService()) {
             Service service = new Service(
                 businessService.getServiceKey(),
                 EntityForLang.getName(businessService.getName(),lang).getValue(),
                 EntityForLang.getDescription(businessService.getDescription(),lang).getValue());
             for (BindingTemplate bindingTemplate : businessService.getBindingTemplates().getBindingTemplate()) {
View Full Code Here

    try {
      GetServiceDetail getServiceDetail = new GetServiceDetail();
      getServiceDetail.getServiceKey().add(serviceKey);
     
     
      ServiceDetail result = inquiry.getServiceDetail(getServiceDetail);
     
      if (result == null)
        Assert.fail("Null result from find service operation");
     
      BindingTemplates templates = result.getBusinessService().get(0).getBindingTemplates();
      if (templates!=null && templates.getBindingTemplate()!=null) {
        System.out.println(templates.getBindingTemplate().size());
        System.out.println("key=" + templates.getBindingTemplate().get(0).getBindingKey());
      }
//      ServiceInfos sInfos = result.getServiceInfos();
View Full Code Here

      if (sInfos == null)
        Assert.fail("No result from getSubscriptionResults operation");
      List<ServiceInfo> siList = sInfos.getServiceInfo();
      if (siList == null || siList.size() == 0)
        Assert.fail("No result from getSubscriptionResults operation");
      ServiceInfo siOut = siList.get(0);
     
      BusinessService bsIn = (BusinessService)EntityCreator.buildFromDoc(TckBusinessService.JOE_SERVICE_XML, "org.uddi.api_v3");

      assertEquals(bsIn.getServiceKey(), siOut.getServiceKey());
     
      TckValidator.checkNames(bsIn.getName(), siOut.getName());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown");   
    }
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.SaveService

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.