Package org.apache.woden.types

Examples of org.apache.woden.types.NCName


    assertEquals("Retrieved Extended InterfaceElement QName group should be empty if none set -", 0, ifeQnameArray.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"));
   
    // addExtendedInterfaceName()
    QName xifeQname1 = new QName("extendedIE1");
    fInterfaceElement.addExtendedInterfaceName(xifeQname1);
    QName xifeQname2 = new QName("extendedIE2");
View Full Code Here


    assertTrue(iffeL.contains(iffe1));
    assertTrue(iffeL.contains(iffe2));
 
    // getInterfaceFaultElement()
    // name one of them
    iffe1.setName(new NCName("FaultName"));
    InterfaceFaultElement retrievedIffe = fInterfaceElement.getInterfaceFaultElement(new QName("FaultName"));
    assertNotNull(retrievedIffe);
    assertEquals("Retrieved InterfaceFaultElement differs from that expected", iffe1, retrievedIffe);
    // try a non-existent fault - should return null
    retrievedIffe = fInterfaceElement.getInterfaceFaultElement(new QName("nonExistentFault"));
View Full Code Here

    assertTrue(ifopL.contains(ifop1));
    assertTrue(ifopL.contains(ifop2));
 
    // getInterfaceOperationElement()
    // name one of them
    ifop1.setName(new NCName("OperationName"));
    InterfaceOperationElement retrievedIfop = fInterfaceElement.getInterfaceOperationElement(new QName("OperationName"));
    assertNotNull(retrievedIfop);
    assertEquals("Retrieved InterfaceOperationElement differs from that expected", ifop1, retrievedIfop);
    // try a non-existent operation - should return null
    retrievedIfop = fInterfaceElement.getInterfaceOperationElement(new QName("nonExistentOperation"));
View Full Code Here

            fail("Can't instantiate the WSDLFactory object.");
        }
        fDescriptionElement = factory.newDescription();
        fDescriptionElement.setTargetNamespace(URI.create(TNS));
        fInterfaceElement = fDescriptionElement.addInterfaceElement();
        fInterfaceElement.setName(new NCName(INTF_NAME));
        fInterfaceOperationElement = fInterfaceElement.addInterfaceOperationElement();
        fInterfaceOperationElement.setName(new NCName(OPER_NAME));
      fMessageReferenceElement = fInterfaceOperationElement.addInterfaceMessageReferenceElement();
    }
View Full Code Here

  /*
   * Test that the (Mandatory) message label attribute ("messageLabel") can be successfully retrieved
   */
  public void testGetMessageLabel()
  {
    NCName messageRefNCName = new NCName("messageRefName");
    fMessageReferenceElement.setMessageLabel(messageRefNCName);
        Description desc = fDescriptionElement.toComponent();
        InterfaceMessageReference msgRef = desc.getInterfaces()[0].getInterfaceOperations()[0].getInterfaceMessageReferences()[0];
    assertEquals("The retrieved message label is not that which was set",
        messageRefNCName, msgRef.getMessageLabel());
View Full Code Here

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

    // 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();
    fBindingElement.setInterfaceName(new QName("interface1"));
   
    //Create and name an Interface Operation Element
    InterfaceOperationElement intOpElement = interfaceElement.addInterfaceOperationElement();
    intOpElement.setName(new NCName("interfaceOperation1"));
   
    fBindingOperationElement = fBindingElement.addBindingOperationElement();
    fBindingOperationElement.setRef(new QName("interfaceOperation1"));

    retrievedIntOpElement = fBindingOperationElement.getInterfaceOperationElement();
View Full Code Here

  /*
   * Test that the (Mandatory) message label attribute ("messageLabel") can be successfully set and retrieved
   */
  public void testSetGetMessageLabel()
  {
    NCName faultRefNCName = new NCName("faultRefName");
    fFaultReference.setMessageLabel(faultRefNCName);
    assertEquals("The retrieved Element name is not that which was set",
        faultRefNCName, fFaultReference.getMessageLabel());
  }
View Full Code Here

    // Create the BindingElement<->InterfaceElement->InterfaceOperationElement->InterfaceFaultReferenceElement 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"));
    InterfaceFaultReferenceElement iffrElement = ifopElement.addInterfaceFaultReferenceElement();
    iffrElement.setMessageLabel(new NCName("Fault1MessageLabel"));
    iffrElement.setRef(new QName("Fault1Ref"));
       
    // Create the BindingOperationElement->BindingFaultReferenceElement hierarchy
    BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
    bopElement.setRef(new QName("operation1"));
    fFaultReference = bopElement.addBindingFaultReferenceElement();
    fFaultReference.setMessageLabel(new NCName("Fault1MessageLabel"));
    fFaultReference.setRef(new QName("Fault1Ref"));

    InterfaceFaultReferenceElement retrievedFault = fFaultReference.getInterfaceFaultReferenceElement();
    assertEquals("The retrieved InterfaceFaultReferenceElement is not that which was set",
        iffrElement, retrievedFault);
View Full Code Here

            fail("Can't instantiate the WSDLFactory object.");
        }

        fDescriptionElement = factory.newDescription();
        fBindingElement = fDescriptionElement.addBindingElement();
        fBindingElement.setName(new NCName("binding"));
        //fBinding = (Binding) fBindingElement;
        fTypeURI = new URI("http://www.w3.org/0000/00/apacheType");
        fBinding = fDescriptionElement.toComponent().getBinding(new QName("binding"));
    }
View Full Code Here

        }

    // Create and name an Interface Element
    DescriptionElement desc = factory.newDescription();
    InterfaceElement interfaceElement = desc.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));
   
    // Create a binding from the description 
    fBindingElement = desc.addBindingElement();
    fBindingElement.setName(new NCName("binding1"));
    desc.toComponent();
    Binding binding = desc.toComponent().getBinding(new QName("binding1"));
 
    // getInterface() - interface attribute unspecified, but hierarchy in place:
    retrievedInterface = binding.getInterface();
    assertNull("Retrieved Interface should be null if interface attribute unspecified -", retrievedInterface);
   
    // getInterface() - interface attribute specified, and hierarchy in place:
    // Set the "interface" attribute to reference the new Interface Element
    // (have to recreate whole desc hierarchy as toComponent() will not rerun if already run!)
    desc = factory.newDescription();
    interfaceElement = desc.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));
    fBindingElement = desc.addBindingElement();
    fBindingElement.setName(new NCName("binding1"));
    fBindingElement.setInterfaceName(new QName("interface1"));
   
    //fDescriptionElement.toComponent();
   
        binding = desc.toComponent().getBinding(new QName("binding1"));
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.