Package de.zh32.pingtest

Examples of de.zh32.pingtest.ServerListPing17$Description


    /**
     * Test for the test-suite/documents/good/XsImport-3G W3C test.
     */
    public void testXsImport3GFromOM(){
      try{
        Description desc = omWSDLReader.readWSDL("http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/XsImport-3G/reservationDetails.wsdl");
        assertNotNull("Description is null.", desc);
        assertFalse("The good XsImport-3G test returned errors. " + handler.getSummaryOfMessageKeys(), handler.messageHasBeenReported());
      }
      catch(Exception e){
        fail("Unable to read WSDL document because of " + e);
View Full Code Here


   
    // Test that the assertion returns true for an interace that extends no other interfaces.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      Description descComp = descEl.toComponent();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
    if(!val.testAssertionInterface1009(interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned false for an interface that extends no other interfaces.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true if the interface is not in the direct or indirect list.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      Description descComp = descEl.toComponent();
      descEl.setTargetNamespace(namespace1);
     
      // Create an interface element, name it and add to the description element
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
     
      // Create another interface element, name it and add to the description element
      InterfaceElement interfac2 = descEl.addInterfaceElement();
      interfac2.setName(name2);

      interfac.addExtendedInterfaceName(interfac2.getName());
     
      InterfaceElement interfac3 = descEl.addInterfaceElement();
      interfac3.setName(name3);
     
      interfac.addExtendedInterfaceName(interfac3.getName());
     
      InterfaceElement interfac4 = descEl.addInterfaceElement();
      interfac4.setName(name4);
     
      interfac2.addExtendedInterfaceName(interfac4.getName());
       
      descComp.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
   
    if(!val.testAssertionInterface1009((Interface)interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned false for an interface that is not in the list of exteneded interfaces.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false if the interface is in the direct list.
  try
  {
    DescriptionElement descEl = factory.newDescription();
    Description descComp = descEl.toComponent();
      descEl.setTargetNamespace(namespace1);
    InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac3.setName(name3);
      interfac.addExtendedInterfaceName(interfac.getName());
      interfac.addExtendedInterfaceName(interfac2.getName());
      interfac.addExtendedInterfaceName(interfac3.getName());
     
      descComp.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
   
    if(val.testAssertionInterface1009(interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned true for an interface that is in the direct extended interface list.");
    }
  }
  catch(Exception e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false if the interface is in the indirect list.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      Description descComp = descEl.toComponent();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac3.setName(name3);
      interfac.addExtendedInterfaceName(interfac2.getName());
      interfac.addExtendedInterfaceName(interfac3.getName());
      interfac2.addExtendedInterfaceName(interfac.getName());
     
      descComp.getInterface(interfac.getName()); //to ensure the Interface can reference its containing Description
   
    if(val.testAssertionInterface1009(interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned true for an interface that is in the indirect extended interface list.");
    }
View Full Code Here

      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
    InterfaceMessageReferenceElement interfaceMessageReference = oper.addInterfaceMessageReferenceElement();
    interfaceMessageReference.setElement(QNameTokenUnion.ANY);

      Description descComp = descEl.toComponent(); //initialise Interface's ref to its Description
      InterfaceMessageReference msgRefComp =
        descComp.getInterfaces()[0].getInterfaceOperations()[0].getInterfaceMessageReferences()[0];
     
      if(!val.testAssertionInterfaceMessageReference1028((InterfaceMessageReferenceImpl)msgRefComp, reporter))
    {
      fail("The testAssertionInterfaceMessageReference1028 method returned false for an interface message reference with the message content model #any and an empty element declaration.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
   
    // Test that the method returns true if the message content model is #none and the element declaration is empty.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
      InterfaceMessageReferenceElement interfaceMessageReference = oper.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setElement(QNameTokenUnion.NONE);

      Description descComp = descEl.toComponent(); //initialise Interface's ref to its Description
      InterfaceMessageReference msgRefComp =
        descComp.getInterfaces()[0].getInterfaceOperations()[0].getInterfaceMessageReferences()[0];
         
      if(!val.testAssertionInterfaceMessageReference1028((InterfaceMessageReferenceImpl)msgRefComp, reporter))
    {
      fail("The testAssertionInterfaceMessageReference1028 method returned false for an interface message reference with the message content model #none and an empty element declaration.");
    }
View Full Code Here

       
        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".",
                wsdlURL);
       
        Description descComp = fReader.readWSDL(wsdlURL.toString());
        assertNotNull("The reader did not return a WSDL description.", descComp);
       
        fBindings = descComp.getBindings();
        assertEquals("The Description should contain 2 Binding components.", 2, fBindings.length);      
  }
View Full Code Here

     
      //Now updating the business by adding another description
      SaveBusiness sb = new SaveBusiness();
      sb.setAuthInfo(authInfo);
      BusinessEntity beIn = beOut;
      Description desc2= new Description();
      desc2.setLang("nl");
      desc2.setValue("Omschrijving");
      beIn.getDescription().add(desc2);
      sb.getBusinessEntity().add(beIn);
      publication.saveBusiness(sb);
 
      // Now get the entity and check the values
View Full Code Here

    }
    assertEquals(descriptions1.size(), descriptions2.size());
    Iterator<Description> descriptions1Itr = descriptions1.iterator();
    Iterator<Description> descriptions2Itr = descriptions2.iterator();
    while (descriptions1Itr.hasNext()) {
      Description description1 = descriptions1Itr.next();
      Description description2 = descriptions2Itr.next();
      assertEquals(description1.getLang(), description2.getLang());
      assertEquals(description1.getValue(), description2.getValue());
    }
  }
View Full Code Here

    if (elem1s.size() == 0 && elem2s.size() == 0) {
      isMatch = true;
    }
   
    while (elem1.hasNext()) {
      Description desc1 = elem1.next();
     
      if (desc1 instanceof org.uddi.api_v3.Description) {
        //Descriptions
        Iterator<Description> elem2 = elem2s.iterator();
        while (elem2.hasNext()) {
          Description desc2 = elem2.next();
          if (desc2 instanceof org.uddi.api_v3.Description) {
            if (desc1.getLang().equals(desc2.getLang()) && desc1.getValue().equals(desc2.getValue())) {
              isMatch=true;
              break;
            }
          }
        }
View Full Code Here

    Iterator<Description> descIter1 = descList1.iterator();
    if (descList1.size() == 0 && doc2.getDescription().size() == 0) {
      descMatch = true;
    }
    while (descIter1.hasNext()) {
      Description descr1 = (Description) descIter1.next();
      List<Description> descList2 = doc2.getDescription();
      Iterator<Description> descElem2 = descList2.iterator();
      while (descElem2.hasNext()) {
        Description descr2 = descElem2.next();
        if (descr1.getLang().equals(descr2.getLang()) && descr1.getValue().equals(descr2.getValue())) {
          descMatch=true;
        }
      }
    }
View Full Code Here

        name.setValue(webServiceAnnotation.serviceName());
      } else {
        name.setValue(clazz.getSimpleName());
      }
      service.getName().add(name);
      Description description = new Description();
      description.setLang(lang);
      description.setValue(TokenResolver.replaceTokens(uddiService.description(),properties));
      service.getDescription().add(description);
     
      //categoryBag on the service
      if (!"".equals(uddiService.categoryBag())) {
        CategoryBag categoryBag = parseCategoryBag(uddiService.categoryBag());
View Full Code Here

     
      String bindingLang = String.valueOf(lang);
      if (uddiServiceBinding.lang()!=null) {
        bindingLang = TokenResolver.replaceTokens(uddiServiceBinding.lang(),properties);
      }
      Description bindingDescription = new Description();
      bindingDescription.setLang(bindingLang);
      bindingDescription.setValue(TokenResolver.replaceTokens(uddiServiceBinding.description(),properties));
      bindingTemplate.getDescription().add(bindingDescription);
     
      AccessPoint accessPoint = new AccessPoint();
      accessPoint.setUseType(AccessPointType.WSDL_DEPLOYMENT.toString());
      if (!"".equals(uddiServiceBinding.accessPointType())) {
View Full Code Here

TOP

Related Classes of de.zh32.pingtest.ServerListPing17$Description

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.