Package org.apache.woden.wsdl20.xml

Examples of org.apache.woden.wsdl20.xml.InterfaceOperationElement


        {
            //This is a limited solution supporting the 3 MEPs in the Part 2 spec.
            //TODO generic support for user-defined, extensible MEPs.
           
            BindingOperationElement bop = (BindingOperationElement)faultRef.getParentElement();
            InterfaceOperationElement iop = bop.getInterfaceOperationElement();
            URI mep = (iop != null ? iop.getPattern() : null); //iop might be null if the WSDL is invalid
           
            if(Constants.MEP_URI_IN_OUT.equals(mep))
            {
                //Ruleset is fault-replaces-message, so fault is in same direction as msg.
                //The <output> is replaced by an <outfault>.
View Full Code Here


        InterfaceFaultReferenceElement intFaultRef = null;
       
        if(fRef != null && fMessageLabel != null)
        {
            BindingOperationElement bindOp = (BindingOperationElement)getParentElement();
            InterfaceOperationElement intOp = bindOp.getInterfaceOperationElement();
            if(intOp != null)
            {
                InterfaceFaultReferenceElement[] intFaultRefs = intOp.getInterfaceFaultReferenceElements();
                for(int i=0; i<intFaultRefs.length; i++)
                {
                    InterfaceFaultReferenceElement temp = intFaultRefs[i];
                    if(fRef.equals(temp.getRef()) &&
                       fMessageLabel.equals(temp.getMessageLabel()))
View Full Code Here

  {
  boolean isValid = true;
  int numInterfaceOperations = interfaceOperations.length;
  for(int j = 0; j < numInterfaceOperations; j++)
  {
    InterfaceOperationElement interfaceOperation = interfaceOperations[j];
   
    if(!validateInterfaceMessageReferences(descElement, interfaceOperation.getInterfaceMessageReferenceElements(), errorReporter))
    isValid = false;
   
    if(!validateInterfaceFaultReferences(descElement, interfaceOperation.getInterfaceFaultReferenceElements(), errorReporter))
      isValid = false;
  }
    return isValid;
  }
View Full Code Here

     * @see org.apache.woden.wsdl20.xml.InterfaceFaultReferenceElement#getInterfaceFaultElement()
     */
    public InterfaceFaultElement getInterfaceFaultElement()
    {
        InterfaceFaultElement fault = null;
        InterfaceOperationElement oper = (InterfaceOperationElement)getParentElement();
        InterfaceElement interfac = (InterfaceElement)oper.getParentElement();
        if (interfac != null) {
            InterfaceFault faultComp = ((Interface)interfac).getFromAllInterfaceFaults(fRef);
            if (faultComp != null) {
                fault = faultComp.toElement();
            }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getInterfaceOperationElement()
     */
    public InterfaceOperationElement getInterfaceOperationElement()
    {
        InterfaceOperationElement oper = null;
        BindingElement binding = (BindingElement)getParentElement();
        InterfaceElement interfac = binding.getInterfaceElement();
        if(interfac != null) {
            InterfaceOperation operComp = ((Interface)interfac).getFromAllInterfaceOperations(fRef);
            if(operComp != null) {
View Full Code Here

     */
    public XmlSchemaElement getXmlSchemaElement()
    {
        XmlSchemaElement xse = null;
        if(fElement != null && fElement.isQName()) {
            InterfaceOperationElement oper = (InterfaceOperationElement)getParentElement();
            InterfaceElement interfac = (InterfaceElement)oper.getParentElement();
            DescriptionElement desc = (DescriptionElement)interfac.getParentElement();
            TypesElement types = desc.getTypesElement();
            if(types != null) {
                xse = ((TypesImpl)types).getElementDeclaration(fElement.getQName());
            }
View Full Code Here

    /*
     * @see org.apache.woden.wsdl20.xml.InterfaceElement#getInterfaceOperationElement(javax.xml.namespace.QName)
     */
    public InterfaceOperationElement getInterfaceOperationElement(QName operName)
    {
        InterfaceOperationElement oper = null;
       
        if(operName != null)
        {
            InterfaceOperationElement tempOper = null;
            for(Iterator i=fInterfaceOperationElements.iterator(); i.hasNext(); )
            {
                tempOper = (InterfaceOperationElement)i.next();
                if(operName.equals(tempOper.getName()))
                {
                    oper = tempOper;
                    break;
                }
            }
View Full Code Here

  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setMessageLabel(MessageLabel.IN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);

      BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference.setMessageLabel(MessageLabel.IN);
         
    if(!val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
    {
      fail("The testAssertionBindingMessageReference1052 method returned false with one valid binding message reference defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when there are two binding message references defined with
  // unique interface message references.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setMessageLabel(MessageLabel.IN);
      InterfaceMessageReferenceElement interfaceMessageReference2 = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference2.setMessageLabel(MessageLabel.OUT);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
      BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference.setMessageLabel(MessageLabel.IN);
      BindingMessageReferenceElement bindingMessageReference2 = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference2.setMessageLabel(MessageLabel.OUT);
         
    if(!val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
    {
      fail("The testAssertionBindingMessageReference1052 method returned false with two valid binding message references defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
 
  // Test that the assertion returns false when there are two binding message references define with
  // the same interface message reference.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setMessageLabel(MessageLabel.IN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
View Full Code Here

      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement interfaceFault = interfac.addInterfaceFaultElement();
      interfaceFault.setName(name3);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name4);
      InterfaceFaultReferenceElement interfaceFaultReference = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
      interfaceFaultReference.setRef(name3QN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name4QN);
      BindingFaultReferenceElement bindingFaultReference = bindingOperation.addBindingFaultReferenceElement();

      bindingFaultReference.setMessageLabel(MessageLabel.IN);
      bindingFaultReference.setRef(name3QN);
         
    if(!val.testAssertionBindingFaultReference1055(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingFaultReferences(), reporter))
    {
      fail("The testAssertionBindingFaultReference1055 method returned false with one valid binding fault reference defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when there are two binding fault references defined with
  // unique interface fault references.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement interfaceFault = interfac.addInterfaceFaultElement();
      interfaceFault.setName(name3);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name4);
      InterfaceFaultReferenceElement interfaceFaultReference = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
      interfaceFaultReference.setRef(name3QN);
      InterfaceFaultReferenceElement interfaceFaultReference2 = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference2.setMessageLabel(MessageLabel.OUT);
      interfaceFaultReference2.setRef(name3QN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name4QN);
      BindingFaultReferenceElement bindingFaultReference = bindingOperation.addBindingFaultReferenceElement();
      bindingFaultReference.setMessageLabel(MessageLabel.IN);
      bindingFaultReference.setRef(name3QN);
      BindingFaultReferenceElement bindingFaultReference2 = bindingOperation.addBindingFaultReferenceElement();
      bindingFaultReference2.setMessageLabel(MessageLabel.OUT);
      bindingFaultReference2.setRef(name3QN);
         
    if(!val.testAssertionBindingFaultReference1055(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingFaultReferences(), reporter))
    {
      fail("The testAssertionBindingFaultReference1055 method returned false with two valid binding fault references defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
 
  // Test that the assertion returns false when there are two binding fault references define with
  // the same interface fault reference.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement interfaceFault = interfac.addInterfaceFaultElement();
      interfaceFault.setName(name3);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name4);
      InterfaceFaultReferenceElement interfaceFaultReference = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
      interfaceFaultReference.setRef(name3QN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
View Full Code Here

      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement interfaceFault = interfac.addInterfaceFaultElement();
      interfaceFault.setName(name2);
      InterfaceOperationElement interfaceOper = interfac.addInterfaceOperationElement();
      interfaceOper.setName(name1);
      InterfaceFaultReferenceElement interfaceFaultReference = interfaceOper.addInterfaceFaultReferenceElement();
      interfaceFaultReference.setRef(name2QN);
      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
     
      BindingElement binding = descEl.addBindingElement();
      binding.setInterfaceName(name1QN);
View Full Code Here

TOP

Related Classes of org.apache.woden.wsdl20.xml.InterfaceOperationElement

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.