Package org.apache.woden.types

Examples of org.apache.woden.types.NCName


        // Create the BindingElement->InterfaceElement->InterfaceOperationElement->InterfaceMessageReferenceElement
        BindingElement bindingElement = descriptionElement.addBindingElement();
        bindingElement.setInterfaceName(new QName("interface1"));
       
        InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
        interfaceElement.setName(new NCName("interface1"));
       
        InterfaceOperationElement ifopElement = interfaceElement.addInterfaceOperationElement();
        ifopElement.setName(new NCName("operation1"));
        InterfaceMessageReferenceElement ifmrElement = ifopElement.addInterfaceMessageReferenceElement();
        ifmrElement.setMessageLabel(new NCName("input1MessageLabel"));
               
        // Create the BindingOperationElement->BindingMessageReferenceElement
        BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
        bopElement.setRef(new QName("operation1"));
        fMessageReference = bopElement.addBindingMessageReferenceElement();
        fMessageReference.setMessageLabel(new NCName("input1MessageLabel"));

        InterfaceMessageReferenceElement retrievedMsgRef = fMessageReference.getInterfaceMessageReferenceElement();
        assertEquals("The InterfaceMessageReferenceElement is not the expected one.",
                ifmrElement, retrievedMsgRef);
    }
View Full Code Here


    /**
     * Test that the getName method returns the expected NCName parsed from a WSDL document.
     */
    public void testGetNameParsedFromOM(){
        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 testSetAndGetNameFromOM(){
        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

     * - setName()
     * - getName()
     */
  public void testGetSetName()
  { 
    fInterfaceOperationElement.setName(new NCName("interfaceOperationName"));
    QName retrievedName = fInterfaceOperationElement.getName();
    assertEquals("Retrieved InterfaceOperationElement name does not match that set -", "interfaceOperationName", retrievedName.toString());
  }
View Full Code Here

    // Create the BindingElement<->InterfaceElement->InterfaceOperationElement->InterfaceMessageReferenceElement hierarchy
    BindingElement bindingElement = descriptionElement.addBindingElement();
    bindingElement.setInterfaceName(new QName("interface1"));
   
    InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));

    InterfaceOperationElement ifopElement = interfaceElement.addInterfaceOperationElement();
    ifopElement.setName(new NCName("operation1"));
    InterfaceMessageReferenceElement ifmrElement = ifopElement.addInterfaceMessageReferenceElement();
    ifmrElement.setMessageLabel(new NCName("MessageRef1MessageLabel"));
       
    // Create the BindingOperationElement->BindingMessageReferenceElement hierarchy
    BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
    bopElement.setRef(new QName("operation1"));
    fBindingMessageRefElement = bopElement.addBindingMessageReferenceElement();
    fBindingMessageRefElement.setMessageLabel(new NCName("MessageRef1MessageLabel"));

    Description descComp = descriptionElement.toComponent();
    descComp.getBindings(); // this triggers setting the link to description in the binding
   
    fBindingMessageRef = (BindingMessageReference) fBindingMessageRefElement;
View Full Code Here

    // Create the BindingElement<->InterfaceElement->InterfaceFaultElement hierarchy
    BindingElement bindingElement = descriptionElement.addBindingElement();
    bindingElement.setInterfaceName(new QName("interface1"));
   
    InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));
   
    InterfaceFaultElement iffElement = interfaceElement.addInterfaceFaultElement();
    iffElement.setName(new NCName("fault1"));

    // Create the BindingOperationElement->BindingFaultReferenceElement hierarchy
    BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
    bopElement.setRef(new QName("operation1"));
    fFault = bindingElement.addBindingFaultElement();
View Full Code Here

    public void testSetAndGetNameFromOM() throws Exception{
       
        DescriptionElement descElem = fFactory.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

    {
        super.setUp();
        WSDLFactory factory = WSDLFactory.newInstance();
      fDescriptionElement = factory.newDescription();
      fBindingElement = fDescriptionElement.addBindingElement();
      fBindingElement.setName(new NCName("bindingName"));
      fInterfaceElement = fDescriptionElement.addInterfaceElement();
      fInterfaceElement.setName(new NCName("interfaceName"));
      fServiceElement = fDescriptionElement.addServiceElement();
      fServiceElement.setName(new NCName("serviceName"));

        //Create a test schema
        InlinedSchema schema = new InlinedSchemaImpl();
        XmlSchema xs1 = null;
        URI schemaNS = null;
View Full Code Here

     * - setName()
     * - getName()
     */
  public void testGetSetName()
  { 
    fInterfaceElement.setName(new NCName("interfaceName"));
    QName uri = fInterfaceElement.getName();
    assertEquals("Retrieved InterfaceElement name does not match that set -", "interfaceName", uri.toString());
  }
View Full Code Here

    assertEquals("Retrieved Extended InterfaceElement group should be empty if none set -", 0, ifeArray.length);
 
    // create further InterfaceElements and name them
    InterfaceElement xife1 = fDescriptionElement.addInterfaceElement();
    InterfaceElement xife2 = fDescriptionElement.addInterfaceElement();
    xife1.setName(new NCName("extendedIE1"));
    xife2.setName(new NCName("extendedIE2"));
    fInterfaceElement.addExtendedInterfaceName(new QName("extendedIE1"));
    fInterfaceElement.addExtendedInterfaceName(new QName("extendedIE2"));
   
    // getExtendedInterfaceElements()
    ifeArray = fInterfaceElement.getExtendedInterfaceElements();
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.