Examples of BindingFault


Examples of javax.wsdl.BindingFault

        Map bindingFaults = bop.getBindingFaults();
        for (Object obj : bindingFaults.values()) {
            if (!(obj instanceof BindingFault)) {
                continue;
            }
            BindingFault faultElement = (BindingFault) obj;
            Iterator ite = faultElement.getExtensibilityElements().iterator();
            while (ite.hasNext()) {
                SoapFault fault = getSoapFault(ite.next());
                if (fault != null) {
                    faults.add(fault);
                }
View Full Code Here

Examples of javax.wsdl.BindingFault

  protected BindingFault parseBindingFault(
    Element bindingFaultEl,
    Definition def)
    throws WSDLException
  {
    BindingFault bindingFault = super.parseBindingFault(bindingFaultEl, def);

    // Try to add element to list
    addElementToList(bindingFaultEl, bindingFault);

    return bindingFault;
View Full Code Here

Examples of javax.wsdl.BindingFault

   * @return A WSDL binding fault element.
   * @throws WSDLException
   */
  protected BindingFault parseBindingFault(Element bindingFaultEl, Definition def) throws WSDLException
  {
    BindingFault bindingFault = def.createBindingFault();
    String name = DOMUtils.getAttribute(bindingFaultEl, Constants.ATTR_NAME);

    if (name != null)
    {
      bindingFault.setName(name);
    }

    Element tempEl = DOMUtils.getFirstChildElement(bindingFaultEl);

    while (tempEl != null)
    {
      if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
      {
        bindingFault.setDocumentationElement(tempEl);
      }
      else
      {
        bindingFault.addExtensibilityElement(parseExtensibilityElement(BindingFault.class, tempEl, def));
      }

      tempEl = DOMUtils.getNextSiblingElement(tempEl);
    }

View Full Code Here

Examples of javax.wsdl.BindingFault

    {
      // for each binding fault, compare the child soap:fault name with the binding fault name

      for (int i = 0; i < bindingFaults.length; i++)
      {
        BindingFault bindingFault = bindingFaults[i];
        SOAPFault soapFault = this.validator.getSoapFault(bindingFault);
        if (soapFault == null
          || soapFault.getName() == null
          || bindingFault.getName() == null
          || !bindingFault.getName().equals(soapFault.getName()))
        {
          result = AssertionResult.RESULT_FAILED;

          failureDetail = this.validator.createFailureDetail(
            soapFault == null ? null : soapFault.toString(), entryContext);
View Full Code Here

Examples of javax.wsdl.BindingFault

            }
            // extensibility elements for each binding operation fault
            Iterator faults = bo.getBindingFaults().values().iterator();
            while (faults.hasNext())
            {
              BindingFault bf = (BindingFault)faults.next();
              parents.add(0, bf);
              validateExtensibilityElementList(parents, bf.getExtensibilityElements(), valInfo);
              parents.remove(0);
            }
          }
          // extensibility elements for binding operation
          validateExtensibilityElementList(parents, bo.getExtensibilityElements(), valInfo);
View Full Code Here

Examples of javax.wsdl.BindingFault

  protected BindingFault parseBindingFault(Element bindingFaultEl,
                                           Definition def)
                                             throws WSDLException
  {
    BindingFault bindingFault = def.createBindingFault();

    List remainingAttrs = DOMUtils.getAttributes(bindingFaultEl);
    String name = DOMUtils.getAttribute(bindingFaultEl,
                                        Constants.ATTR_NAME,
                                        remainingAttrs);

    if (name != null)
    {
      bindingFault.setName(name);
    }

    //register any NS decls with the Definition
    NamedNodeMap attrs = bindingFaultEl.getAttributes();
    registerNSDeclarations(attrs, def);

    Element tempEl = DOMUtils.getFirstChildElement(bindingFaultEl);

    while (tempEl != null)
    {
      if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
      {
        bindingFault.setDocumentationElement(tempEl);
      }
      else
      {
        bindingFault.addExtensibilityElement(
          parseExtensibilityElement(BindingFault.class, tempEl, def));
      }

      tempEl = DOMUtils.getNextSiblingElement(tempEl);
    }
View Full Code Here

Examples of javax.wsdl.BindingFault

        errors.add( XmlError.forMessage( o.toString() ) );
    }

    while( i.hasNext() )
    {
      BindingFault bindingFault = i.next();
      String faultName = bindingFault.getName();

      Part[] faultParts = WsdlUtils.getFaultParts( bindingOperation, faultName );
      if( faultParts.length == 0 )
      {
        log.warn( "Missing fault parts in wsdl for fault [" + faultName + "] in bindingOperation ["
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingFault

     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:QName is represented
     * in the Component model extensions by the expected QName.
     */
    public void testSoapFaultCode_QName()
    {
        BindingFault bindFault = fBinding.getBindingFaults()[0];
        SOAPBindingFaultExtensions soapBindFaultExts =
            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionContext(SOAPConstants.NS_URI_SOAP);
        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
       
        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
        assertTrue("The SOAPFaultCode does not represent a QName.", soapFaultCode.isQName());
        assertEquals("The QName represented by the SOAPFaultCode is not the expected one.",
View Full Code Here

Examples of org.eclipse.wst.wsdl.BindingFault

     * Compare the Faults
     ******************************************************/
    // Remove any BindingFaults which are no longer used
    for (int index = 0; index < bindingFaults.size(); index++)
    {
      BindingFault bindingFault = (BindingFault)bindingFaults.get(index);

      boolean foundMatch = false;
      Iterator faultsIt = faults.iterator();
      while (faultsIt.hasNext())
      {
        Fault fault = (Fault)faultsIt.next();
        if (namesEqual(bindingFault.getName(), fault.getName()))
        {
          foundMatch = true;
          break;
        }
      }

      if (!foundMatch)
      {
        // We need to remove this BindingFault from the bindingFaults List
        bindingFaults.remove(index);
        index--;
      }
    }

    // Remove any Faults which already exists in bindingFaults.  What we
    // have left are the Faults which needs newly created BindingFaults
    List bindingFaultsNeeded = new ArrayList();
    for (int index = 0; index < faults.size(); index++)
    {
      Fault fault = (Fault)faults.get(index);

      boolean foundMatch = false;
      Iterator bindingFaultsIt = bindingFaults.iterator();
      while (bindingFaultsIt.hasNext())
      {
        BindingFault bindingFault = (BindingFault)bindingFaultsIt.next();
        if (namesEqual(bindingFault.getName(), fault.getName()))
        {
          foundMatch = true;
          break;
        }
      }

      if (!foundMatch)
      {
        // We need to remove this BindingFault from the bindingFaults List
        bindingFaultsNeeded.add(fault);
      }
    }

    // bindingFaultsNeeded contains the needed BindingFault's we need to create
    Iterator neededBindingFaultsIt = bindingFaultsNeeded.iterator();
    while (neededBindingFaultsIt.hasNext())
    {
      Fault fault = (Fault)neededBindingFaultsIt.next();
      BindingFault newBindingFault = factory.createBindingFault();
      newBindingFault.setEFault(fault);
      newBindingFault.setName(fault.getName());
      bindingOperation.addBindingFault(newBindingFault);
    }

    // Create the contents for each BindingFault
    Iterator faultContentIt = bindingOperation.getEBindingFaults().iterator();
    while (faultContentIt.hasNext())
    {
      BindingFault bindingFault = (BindingFault)faultContentIt.next();
      generateBindingFaultContent(bindingFault);
    }

    generateBindingOperationContent(bindingOperation);
  }
View Full Code Here

Examples of org.eclipse.wst.wsdl.BindingFault

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public javax.wsdl.BindingFault getBindingFault(String name)
  {
    BindingFault result = null;
    for (Iterator i = getEBindingFaults().iterator(); i.hasNext();)
    {
      BindingFault fault = (BindingFault)i.next();
      if (name.equals(fault.getName()))
      {
        result = fault;
        break;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.