Package org.apache.woden.types

Examples of org.apache.woden.types.NCName


    } catch(URISyntaxException e) {
      // Do nothing.
    }
   
    InterfaceElement interfac = descEl.addInterfaceElement();
    interfac.setName(new NCName("name"));
    InterfaceElement interfac2 = descEl.addInterfaceElement();
    interfac2.setName(new NCName("name"));
    // Need to create an extended interface otherwise the component model treats the
    // two interfaces as equal and only adds one to the set.
    InterfaceElement interfac3 = descEl.addInterfaceElement();
    interfac3.setName(new NCName("name3"));
    interfac2.addExtendedInterfaceName(interfac3.getName());
     
    try {
      assertion.validate(descComp, wodenContext);
    } catch(WSDLException e) {
View Full Code Here


    /* Set up prereqs:
     * - Service with > 1 endpoints created.
     */
    ServiceElement fServiceElement = new ServiceImpl();
    EndpointElement fEndpointElement1 = fServiceElement.addEndpointElement();
    fEndpointElement1.setName(new NCName("endpoint1"));
    EndpointElement fEndpointElement2 = fServiceElement.addEndpointElement();
    fEndpointElement2.setName(new NCName("endpoint2"));   
    Service fService = (Service) fServiceElement;
   
    // test getEndpoint()
    Endpoint e1 = fService.getEndpoint(new NCName("endpoint1"));
    assertEquals("The retrieved Endpoint object is not that which was set", e1, fEndpointElement1);
   
    // test getEndpoints()
    Endpoint[] e = fService.getEndpoints();
    assertEquals("The incorrect number of endpoints were returned", e.length, 2);
View Full Code Here

        // Description...
      DescriptionElement fDescElement = factory.newDescription();
     
      // Interface
      InterfaceElement fInterfaceElement = fDescElement.addInterfaceElement();
    fInterfaceElement.setName(new NCName("interface1"));
   
       // Service...
      ServiceElement fServiceElement = fDescElement.addServiceElement();
      fServiceElement.setName(new NCName("service1"));
      fServiceElement.setInterfaceName(new QName("interface1"));
     
      // "create" the component model to complete the woden object hierachy references
      Description fDesc = fDescElement.toComponent();
      fDesc.getServices(); // necessary to set the reference to Description in Service
View Full Code Here

   */
  public void testGetName()
  { 
    // for simplicity, the default namespace is used throughout such that the string representation of
    // QName from the getter will be identical to the NCName of the setter, for the test to succeed.
    ((ServiceImpl)fEmptyService).setName(new NCName("service1"));
    assertEquals("The service name from getName() differs from that set.", fEmptyService.getName().toString(), "service1");
  }
View Full Code Here

        }
       
        DescriptionElement descElem = factory.newDescription();
        descElem.setTargetNamespace(new URI("urn:woden"));
        ServiceElement service = descElem.addServiceElement();
        service.setName(new NCName(fQName.getLocalPart()));
        assertTrue("QName returned by ServiceElement.getName() was not the one set by setName().",
                   fQName.equals(service.getName()));
    }
View Full Code Here

      DescriptionElement fDescElement = factory.newDescription();
     
      // Binding...
        fBindingQName = new QName("binding1");
      BindingElement fBindingElement = fDescElement.addBindingElement();
        fBindingNCName = new NCName("binding1");
        NCName fServiceNCName = new NCName("service1");
        QName fServiceQName = new QName("service1");
        NCName fEndpointNCname = new NCName("endpoint1");
      fBindingElement.setName(fBindingNCName);
     
      // Service... (attach our Endpoint to a Service parented by our Description)
      ServiceElement fServiceElement = fDescElement.addServiceElement();
      fServiceElement.setName(fServiceNCName);
View Full Code Here

      assertEquals(fDerivedEndpoint.getBinding().getName(), fBindingQName); // just compare QNames
  }
   
    public void testGetName()
  {
        fName = new NCName("endpoint_name")
      fEndpointImpl.setName(fName);
      assertEquals(fEndpoint.getName(), fName);
  }
View Full Code Here

    /**
     * Test that the getName method returns the expected NCName parsed from a WSDL document.
     */
    public void testGetNameParsed()
    {
        NCName ncName = fParsedEndpoints[0].getName();
        assertNotNull("EndpointElement.getName() returned null, but an NCName was expected.",
                ncName);
       
        assertTrue("NCName returned by EndpointElement.getName() was not the one expected.",
                "endpoint1".equals(ncName.toString()) );
    }
View Full Code Here

     * Test that the NCName specified on the setName method is returned by getName.
     */
    public void testSetAndGetName()
    {
        EndpointElement endpoint = new EndpointImpl();
        NCName ncName = new NCName("dummy");

        endpoint.setName(ncName);
        assertTrue("NCName returned by EndpointElement.getName() was not the one set by setName().",
                ncName.equals(endpoint.getName()));
    }
View Full Code Here

    assertNull("Retrieved Interface Element should be null if none set -", retrievedInterfaceElement);

    // Create and name an Interface Element
    DescriptionElement desc = fFactory.newDescription();
    InterfaceElement interfaceElement = desc.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));
   
    // Create a binding from the description
    fBindingElement = desc.addBindingElement();
 
    // getInterfaceElement() - interface attribute unspecified, but hierarchy in place:
View Full Code Here

TOP

Related Classes of org.apache.woden.types.NCName

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.