Package org.apache.juddi.xlt.action.SOAP

Examples of org.apache.juddi.xlt.action.SOAP.GetAuthenticationToken


   */
  @Test
  public void registerBusiness() throws Throwable
  {
    //Get an Authentification Token.
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
   
    //Generate a unique business name including a pseudo random number.
    String uniqueBusinessName = "business no " + UUID.randomUUID().toString();
   
    //Publish a random number of services (0 < number of services generate < maxNumberOfBusinessServices).
    //If the property maxNumberOfBusinessServices is not found, the max will be the second argument
    //of the getProperties method call (in this case 2
    int numberOfBusinessService = XltRandom.nextInt(getProperty("maxNumberOfBusinessServices", 1)) + 1;
   
    //Save business under generated name using Auth token and save the above random number of services.
    RegisterBusinessFlow registerBusinessFlow = new RegisterBusinessFlow(getAuthenticationToken.getAuthenticationToken(),
        uniqueBusinessName, numberOfBusinessService);
   
    //Get returned business name (should be the same).
    String businessName = registerBusinessFlow.getBusinessDetail().getBusinessEntity().get(0).getName().get(0).getValue();
   
View Full Code Here


    //juddi node as business names (a different business per name).
    DataProvider names = new DataProvider("default/BusinessNames.txt");
    String businessName = names.getRandomRow();
   
    //Get an AuthToken.
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
 
    //Find the random business by passing it's name and the AuthToken.
    FindBusinessByName findBusinessByName = new FindBusinessByName(getAuthenticationToken.getAuthenticationToken(),
        businessName);
    findBusinessByName.run();
   
    //Print out the business that was found and the services published under it.
    for(BusinessInfo bi : findBusinessByName.getBusinessInfos().getBusinessInfo())
View Full Code Here

   */
  @Test
  public void registerBusiness() throws Throwable
  {
    //Get an Authentication Token.
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
   
    //Generate a unique business name including a pseudo random uuid.
    String uniqueBusinessName = "business no " + UUID.randomUUID().toString();
   
    //Save business under generated name using Auth token.
    RegisterBusiness registerBusiness = new RegisterBusiness(getAuthenticationToken.getAuthenticationToken(), uniqueBusinessName);
    registerBusiness.run();
   
    //Retrieve business key and name from returned BusinessDetail object. The key, given
    //by jUUDI, will be submitted while publishing services under the business. The name
    //is used to generate the services access point and later to verify that jUDDI can
    //find the business again.
    String businesskey = registerBusiness.getBusinessDetail().getBusinessEntity().get(0).getBusinessKey();
    String businessName = registerBusiness.getBusinessDetail().getBusinessEntity().get(0).getName().get(0).getValue();
   
    //Publish a single services under the new business.
    RegisterService registerService = new RegisterService(
        getAuthenticationToken.getAuthenticationToken(), businesskey, businessName);
    registerService.run();
   
    //Find all businesses. This should return a SOAP message with a list of all businesses.
    FindBusinessByName findBusinessByName = new FindBusinessByName(getAuthenticationToken.getAuthenticationToken(),
        "%");
    findBusinessByName.run()
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.xlt.action.SOAP.GetAuthenticationToken

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.