Package javax.wsdl

Examples of javax.wsdl.BindingOutput


          // Iterate over all input/output extensibles, looking for <SOAP:Body> elements.
          try
          {
            BindingInput bindingInput = bindingOperations[bo].getBindingInput();
            BindingOutput bindingOutput =
              bindingOperations[bo].getBindingOutput();

            Iterator extElements =
              bindingInput.getExtensibilityElements().iterator();
            while (extElements.hasNext())
            {
              try
              {
                soapHeaderList.add((SOAPHeader) extElements.next());
              }
              catch (ClassCastException e)
              { // ignore everything but SOAP Header.
              }
            }

            extElements = bindingOutput.getExtensibilityElements().iterator();
            while (extElements.hasNext())
            {
              try
              {
                soapHeaderList.add((SOAPHeader) extElements.next());
View Full Code Here


              {
                bInput = null;
              }
            }

            BindingOutput bOutput = bindingOp.getBindingOutput();
            if (bOutput != null)
            {
              SOAPBody outputSoapBody = getSoapBody(bOutput);

              if (outputSoapBody == null
View Full Code Here

  protected BindingOutput parseBindingOutput(
    Element bindingOutputEl,
    Definition def)
    throws WSDLException
  {
    BindingOutput bindingOutput =
      super.parseBindingOutput(bindingOutputEl, def);

    // Try to add element to list
    addElementToList(bindingOutputEl, bindingOutput);
View Full Code Here

    }

    if (portType != null)
    {
      BindingInput bindingInput = bindingOperation.getBindingInput();
      BindingOutput bindingOutput = bindingOperation.getBindingOutput();
      String inputName = (bindingInput != null ? bindingInput.getName() : null);
      String outputName =
        (bindingOutput != null ? bindingOutput.getName() : null);

      //Operation op = portType.getOperation(name, inputName, outputName);
      // Get all operations, and then find the first one that matches
      Operation op = null, checkOperation;
      Iterator iterator = portType.getOperations().iterator();
View Full Code Here

      {
        BindingOperation bindingOperation = (BindingOperation) ops.get(i);

        // Getting wsdl:input and wsdl:output elements of an operation
        BindingInput bindingInput = bindingOperation.getBindingInput();
        BindingOutput bindingOutput = bindingOperation.getBindingOutput();

        // Collecting all the mime:multipartRelated elements from wsdl:input and wsdl:output
        List inputMultiparts = getMimeMultipartElements(
          bindingInput == null ? null : bindingInput.getExtensibilityElements());
        List outputMultiparts = getMimeMultipartElements(
          bindingOutput == null ? null : bindingOutput.getExtensibilityElements());

        // If the wsdl:input contains mime:multipartRelated elements
        if (!inputMultiparts.isEmpty())
        {
          multipartsFound = true;
View Full Code Here

    }

    if (portType != null)
    {
      BindingInput bindingInput = bindingOperation.getBindingInput();
      BindingOutput bindingOutput = bindingOperation.getBindingOutput();
      //String inputName = (bindingInput != null ? bindingInput.getName() : null);
      //String outputName = (bindingOutput != null ? bindingOutput.getName() : null);

      // hack code to get at operations that are defined with the same name but different
      // inputs and outputs
      Operation op = null;
      List operations = portType.getOperations();
      // get a list of all operations with matching names
      List matchingOperations = new Vector();
      Iterator iOperations = operations.iterator();
      while (iOperations.hasNext())
      {
        Operation oper = (Operation)iOperations.next();
        if (oper.getName().equalsIgnoreCase(bindingOperation.getName()))
        {
          matchingOperations.add(oper);
        }
      }

      if (matchingOperations != null)
      {
        // If there's only one matching operation this is what we're referring to.
        // Only matching if binding operation input name and output name are
        // both null or the same as the portType operation input and output names.
        // the portType operation name
        if (matchingOperations.size() == 1)
        {
          // only say the single operation is the one we're looking for if the names
          // of the binding input and output are not specified
          Operation tempOp = (Operation)matchingOperations.get(0);
          boolean inputOK = false;
          boolean outputOK = false;
          Input tempInput = tempOp.getInput();
          Output tempOutput = tempOp.getOutput();

          // order is important in these conditions. condition 2 must fail for 3 to work
          // check the input
          if (tempInput == null && bindingInput == null)
          {
            inputOK = true;
          }
          else if (bindingInput == null || bindingInput.getName() == null)
          {
            inputOK = true;
          }
          else if (tempInput != null && bindingInput.getName().equals(tempInput.getName()))
          {
            inputOK = true;
          }
          // check the output
          if (tempOutput == null && bindingOutput == null)
          {
            outputOK = true;
          }
          else if (bindingOutput == null || bindingOutput.getName() == null)
          {
            outputOK = true;
          }
          else if (tempOutput != null && bindingOutput.getName().equals(tempOutput.getName()))
          {
            outputOK = true;
          }
          if (inputOK && outputOK)
          {
            op = tempOp;
          }
          //          op = (Operation) matchingOperations.get(0);
        }
        // otherwise find the operation with the same name, inputname, outputname signature
        if (matchingOperations != null && op == null)
        {
          Iterator iMatchingOperations = matchingOperations.iterator();
          while (iMatchingOperations.hasNext())
          {

            boolean inputNamesEqual = false;
            boolean outputNamesEqual = false;
            Operation oper = (Operation)iMatchingOperations.next();
            //          if (oper.getName().equalsIgnoreCase(bindingOperation.getName()))
            //          {
            Input opInput = oper.getInput();
            if (opInput != null && bindingInput != null)
            {
              String opInputName = opInput.getName();
              String bindingInputName = bindingInput.getName();
              if (opInputName != null && opInputName.equalsIgnoreCase(bindingInputName))
              {
                inputNamesEqual = true;
              }
              else if (opInputName == null && bindingInputName == null)
              {
                inputNamesEqual = true;
              }
            }
            else if (opInput == null && bindingInput == null)
            {
              inputNamesEqual = true;
            }
            Output opOutput = oper.getOutput();
            if (opOutput != null && bindingOutput != null)
            {
              String opOutputName = opOutput.getName();
              String bindingOutputName = bindingOutput.getName();
              if (opOutputName != null && opOutputName.equalsIgnoreCase(bindingOutputName))
              {
                outputNamesEqual = true;
              }
              else if (opOutputName == null && bindingOutputName == null)
View Full Code Here

   * @return A WSDL binding output element.
   * @throws WSDLException
   */
  protected BindingOutput parseBindingOutput(Element bindingOutputEl, Definition def) throws WSDLException
  {
    BindingOutput bindingOutput = def.createBindingOutput();
    String name = DOMUtils.getAttribute(bindingOutputEl, Constants.ATTR_NAME);

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

    Element tempEl = DOMUtils.getFirstChildElement(bindingOutputEl);

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

      tempEl = DOMUtils.getNextSiblingElement(tempEl);
    }

View Full Code Here

      {
        BindingOperation bindingOperation = (BindingOperation) ops.get(i);

        // Getting wsdl:input and wsdl:output elements of an operation
        BindingInput bindingInput = bindingOperation.getBindingInput();
        BindingOutput bindingOutput = bindingOperation.getBindingOutput();

        QName inapplicableElement = null;
        // Getting an inapplicable extensibility element of wsdl:input
        // If such element exists, the assertion failed
        if (bindingInput != null)
        {
          // Getting an inapplicable extensibility element of wsdl:input
          // If such element exists, the assertion failed
          inapplicableElement = getInapplicableElement(bindingInput.getExtensibilityElements());

          if (inapplicableElement != null)
            throw new AssertionFailException(inapplicableElement.toString());
        }
       
        // Getting an inapplicable extensibility element of wsdl:output
        // If such element exists, the assertion failed
        if (bindingOutput != null)
        {
          inapplicableElement =
            getInapplicableElement(bindingOutput.getExtensibilityElements());
          if (inapplicableElement != null)
            throw new AssertionFailException(inapplicableElement.toString());
        }
      }
    }
View Full Code Here

            }
            // If this is a response message,
            // then getting wsdl:output for an operation
            else
            {
              BindingOutput opOutput = operation.getBindingOutput();
              if (opOutput != null)
              {
                // If wsdl:output is presented then checking
                // whether the block name is described there or not
                blockNameExists = blockNameExists(
                  opOutput.getExtensibilityElements(), blockName);
              }
            }
          }
        }
View Full Code Here

      {
        BindingOperation bindingOperation = (BindingOperation) ops.get(i);

        // Getting wsdl:input and wsdl:output elements of an operation
        BindingInput bindingInput = bindingOperation.getBindingInput();
        BindingOutput bindingOutput = bindingOperation.getBindingOutput();

        Input portTypeInput = bindingOperation.getOperation().getInput();
        Output portTypeOutput = bindingOperation.getOperation().getOutput();
        // If the corresponding wsdl:input exists in wsdl:portType
        // and includes the message attribute
        if (portTypeInput != null && portTypeInput.getMessage() != null)
        {
          // Collecting all the message's parts defined with ref:swaRef
          List swaRefParts = getSwaRefParts(portTypeInput.getMessage());
          if (!swaRefParts.isEmpty())
          {
            swaRefFound = true;
            // Getting a wsdl:part that is unbound
            String unboundPart = getUnboundPart(swaRefParts,
              portTypeInput.getMessage().getQName(),
              bindingInput == null ? null : bindingInput.getExtensibilityElements());
            // If such wsdl:part exists, assertion failed
            if (unboundPart != null)
              throw new AssertionFailException("The part \"" + unboundPart
                + "\" is not bound properly to the wsdl:input of the \""
                + bindingOperation.getName() + "\" binding operation.");
          }
        }

        // If the corresponding wsdl:output exists in wsdl:portType
        // and includes the message attribute
        if (portTypeOutput != null && portTypeOutput.getMessage() != null)
        {
          // Collecting all the message's parts defined with ref:swaRef
          List swaRefParts = getSwaRefParts(portTypeOutput.getMessage());
          if (!swaRefParts.isEmpty())
          {
            swaRefFound = true;
            // Getting a wsdl:part that is unbound
            String unboundPart = getUnboundPart(swaRefParts,
              portTypeOutput.getMessage().getQName(),
              bindingOutput == null ? null : bindingOutput.getExtensibilityElements());
            // If such wsdl:part exists, assertion failed
            if (unboundPart != null)
              throw new AssertionFailException("The part \"" + unboundPart
                + "\" is not bound properly to the wsdl:input of the \""
                + bindingOperation.getName() + "\" binding operation.");
View Full Code Here

TOP

Related Classes of javax.wsdl.BindingOutput

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.