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

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


   *
   */
  @Test
  public void subscribe() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
    AuthToken authToken = getAuthenticationToken.getAuthenticationToken();
   
    RegisterBusiness registerBusiness = new RegisterBusiness(authToken, "Abonement");
    registerBusiness.run();
   
    //FindBusinessByName findBusinessByName = new FindBusinessByName(authToken,
View Full Code Here


{
 
  @Test
  public void registerBusiness() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
 
    FindBusinessByName findBusinessByName = new FindBusinessByName(getAuthenticationToken.getAuthenticationToken());
    findBusinessByName.run();
   
    for(BusinessInfo bi : findBusinessByName.getBusinessInfos().getBusinessInfo())
    {
      System.out.println(bi.getName().get(0).getValue() + " - " + bi.getBusinessKey());
View Full Code Here

public class TFindServiceByName extends AbstractUDDIClientTestCase
{
  @Test
  public void findBusiness() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
   
    FindServices findServices = new FindServices(getAuthenticationToken.getAuthenticationToken());
    findServices.run()
  }
View Full Code Here

   * Gets a AuthToken from Juddi
   * @throws Throwable
   */
  @Test
  public void test() throws Throwable {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
  }
View Full Code Here

*/
public class TPublishSingleService extends AbstractUDDIClientTestCase {

  @Test
  public void test() throws Throwable {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();

    FindBusinessByName findBusiness = new FindBusinessByName(
        getAuthenticationToken.getAuthenticationToken());
    findBusiness.run();
   
    for (BusinessInfo bi : findBusiness.getBusinessInfos().getBusinessInfo())
    {
      System.out.println(bi.getName().get(0).getValue());
    }
   

    RegisterService publishService = new RegisterService(
        getAuthenticationToken.getAuthenticationToken(), findBusiness
            .getBusinessInfo());
    publishService.run();
  }
View Full Code Here

 
 
  @Test
  public void deleteService() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
 
    AuthToken authToken= getAuthenticationToken.getAuthenticationToken();
   
    FindServices findServices = new FindServices(authToken);
    findServices.run();
   
    System.out.println(name);
View Full Code Here

   */
  @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);
  }
View Full Code Here

   */
  @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();
   
    //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 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;
   
    for (int serviceCount = 0; serviceCount < numberOfBusinessService; serviceCount++ )
    {
      RegisterService registerService = new RegisterService(
          getAuthenticationToken.getAuthenticationToken(), businesskey, businessName);
      registerService.run();
    }

    //Find the business that was published.
    FindBusinessByName findBusinessByName = new FindBusinessByName(getAuthenticationToken.getAuthenticationToken(),
        businessName);
    findBusinessByName.run()
  }
View Full Code Here

  GeneralDataProvider data = GeneralDataProvider.getInstance();

  @Test
  public void deleteBusiness() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
   
    //Get the AuthToken
    AuthToken authToken= getAuthenticationToken.getAuthenticationToken();
   
    BusinessEntity businessEntity;
   
    // If there are no businesses in the data pool submit one with a rate of 100
    // to ensure that it will be entered
View Full Code Here

   */
  @Test
  public void findBusiness() throws Throwable
  {
    //Get an AuthToken.
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
   
    //Uses lists in config/data/default/
    GeneralDataProvider data = GeneralDataProvider.getInstance();
   
    //Pick a random number of services to publish under the business.
    int numberOfBusinessService = XltRandom.nextInt(getProperty("maxNumberOfBusinessServices", 1)) + 1;
   
    if(dataPool.getSize() <= 50)
    {
     
      //Pick a company name from a previously generated list of business names.
      String businessName = data.getCompany(false);
     
      //Register the business with services
      RegisterBusinessFlow registerBusinessFlow = new RegisterBusinessFlow(getAuthenticationToken.getAuthenticationToken(),
          businessName, numberOfBusinessService);
     
      Thread.sleep(4000);
     
      //Add the returnThread.sleep(8000);ed BusinessEntity to the data pool.
      dataPool.add(registerBusinessFlow.getBusinessDetail().getBusinessEntity().get(0), 100);
       
    }
    else
    {
      //Get a business entity from the pool.
      BusinessEntity businessEntity= dataPool.getDataElement();
     
      if (businessEntity == null)
      {
        //Pick a company name from a previously generated list of business names.
        String businessName = data.getCompany(false);
       
        //Register the business with services
        RegisterBusinessFlow registerBusinessFlow = new RegisterBusinessFlow(getAuthenticationToken.getAuthenticationToken(),
            businessName, numberOfBusinessService);
       
        Thread.sleep(4000);
       
        //Add the returnThread.sleep(8000);ed BusinessEntity to the data pool.
        dataPool.add(registerBusinessFlow.getBusinessDetail().getBusinessEntity().get(0), 100);
      }
      else
      {
        //Find the random business by passing it's name and the AuthToken.
        FindBusinessByName findBusinessByName = new FindBusinessByName(getAuthenticationToken.getAuthenticationToken(),
            businessEntity.getName().get(0).getValue());
        findBusinessByName.run();
       
        //Offer the business entity back to the pool with 50% chance that it will be rejected
        //if the pool is full.
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.