Examples of BindingOperation


Examples of javax.wsdl.BindingOperation

    private void createBindingOperations(Definition definition, Binding binding) throws WSDLException {
        PortType portType = binding.getPortType();
        for (Iterator<?> operationIterator = portType.getOperations().iterator(); operationIterator.hasNext();) {
            Operation operation = (Operation) operationIterator.next();
            BindingOperation bindingOperation = definition.createBindingOperation();
            bindingOperation.setOperation(operation);
            populateBindingOperation(definition, bindingOperation);
            if (OperationType.REQUEST_RESPONSE.equals(operation.getStyle())) {
                createBindingInput(definition, operation, bindingOperation);
                createBindingOutput(definition, operation, bindingOperation);
            }
            else if (OperationType.ONE_WAY.equals(operation.getStyle())) {
                createBindingInput(definition, operation, bindingOperation);
            }
            else if (OperationType.NOTIFICATION.equals(operation.getStyle())) {
                createBindingOutput(definition, operation, bindingOperation);
            }
            else if (OperationType.SOLICIT_RESPONSE.equals(operation.getStyle())) {
                createBindingOutput(definition, operation, bindingOperation);
                createBindingInput(definition, operation, bindingOperation);
            }
            for (Iterator<?> faultIterator = operation.getFaults().values().iterator(); faultIterator.hasNext();) {
                Fault fault = (Fault) faultIterator.next();
                BindingFault bindingFault = definition.createBindingFault();
                populateBindingFault(definition, bindingFault, fault);
                if (StringUtils.hasText(bindingFault.getName())) {
                    bindingOperation.addBindingFault(bindingFault);
                }
            }
            binding.addBindingOperation(bindingOperation);
        }
    }
View Full Code Here

Examples of javax.wsdl.BindingOperation

        }
    }

    protected void buildBindingOperation(Definition def, Binding binding,
                                       Collection<BindingOperationInfo> bindingOperationInfos) {
        BindingOperation bindingOperation = null;
        for (BindingOperationInfo bindingOperationInfo : bindingOperationInfos) {
            bindingOperation = def.createBindingOperation();
            addDocumentation(bindingOperation, bindingOperationInfo.getDocumentation());
            bindingOperation.setName(bindingOperationInfo.getName().getLocalPart());
            for (Operation operation
                    : CastUtils.cast(binding.getPortType().getOperations(), Operation.class)) {
                if (operation.getName().equals(bindingOperation.getName())) {
                    bindingOperation.setOperation(operation);
                    break;
                }
            }
            buildBindingInput(def, bindingOperation, bindingOperationInfo.getInput());
            buildBindingOutput(def, bindingOperation, bindingOperationInfo.getOutput());
View Full Code Here

Examples of javax.wsdl.BindingOperation

                    // add binding output element to bindings for this port type
                    for (Object bindObj : definition.getAllBindings().values()) {
                        Binding binding = (Binding)bindObj;
                        if (binding.getPortType().equals(portType)) {
                            BindingOperation op = binding.getBindingOperation(opName, null, null);
                            if (op != null && op.getBindingInput() != null && op.getBindingOutput() == null) {
                                BindingOutput bindingOut = definition.createBindingOutput();
                                for (Object extObj : op.getBindingInput().getExtensibilityElements()) {
                                    bindingOut.addExtensibilityElement((ExtensibilityElement)extObj);
                                }
                                op.setBindingOutput(bindingOut);
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.woden.wsdl20.BindingOperation

        Interface wsdlInterface = wsdlEndpoint.getBinding().getInterface();
        InterfaceOperation[] wsdlOperations = wsdlInterface.getInterfaceOperations();
        for (int i = 0; i < wsdlOperations.length; i++) {
            // Retrieve binding and extension
            InterfaceOperation wsdlOperation = wsdlOperations[i];
            BindingOperation wsdlBindingOperation = findBindingOperation(wsdlEndpoint.getBinding(), wsdlOperation);
            HTTPBindingOperationExtensions opExt = wsdlBindingOperation != null ? (HTTPBindingOperationExtensions) wsdlBindingOperation.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) : null;
            // Create operation
            Wsdl2HttpOperationImpl operation = new Wsdl2HttpOperationImpl();
            // Standard WSDL2 attributes
            operation.setName(wsdlOperation.getName());
            operation.setMep(wsdlOperation.getMessageExchangePattern());
View Full Code Here

Examples of org.eclipse.wst.wsdl.BindingOperation

            boolean foundMatch = false;
            Iterator bindingOperationsIt = bindingOperations.iterator();
            while (bindingOperationsIt.hasNext())
            {
              BindingOperation bindingOperation = (BindingOperation)bindingOperationsIt.next();

              if (namesEqual(bindingOperation.getName(), operation.getName()))
              {
                foundMatch = true;
                break;
              }
            }

            if (!foundMatch)
            {
              newBindingOpsNeeded.add(operation);
            }
          }
          // newBindingOpsNeeded is the List of Operations needing new corresponding
          // BindingOperation's
          List newBindingOps = createNewBindingOperations(newBindingOpsNeeded);

          // don't add required namespace if nothing is really being added
          if (!newBindingOps.isEmpty()) {
            addRequiredNamespaces(binding);           
          }
         
          // Generate the contents of the new BindingOperation's
          Iterator newBindingOpsIt = newBindingOps.iterator();
          while (newBindingOpsIt.hasNext())
          {
            BindingOperation newBindingOp = (BindingOperation)newBindingOpsIt.next();
            generateBindingOperation(newBindingOp);
            generateBindingOperationContent(newBindingOp);
          }
        }

        generateBindingContent(binding);
      }
      else
      {
        // Overwrite
        if (portType == null)
        {
          // We need to blow away everything under the Binding.  No PortType associated with this Binding
          bindingOperations.clear();
          return binding;
        }
        else
        {
          addRequiredNamespaces(binding);
          List operations = portType.getOperations();

          /******************************************************
           * Compare the Operations
           ******************************************************/
          // Remove any BindingOperations which are no longer used
          for (int index = 0; index < bindingOperations.size(); index++)
          {
            BindingOperation bindingOperation = (BindingOperation)bindingOperations.get(index);

            boolean foundMatch = false;
            Iterator operationsIt = operations.iterator();
            while (operationsIt.hasNext())
            {
              Operation operation = (Operation)operationsIt.next();

              if (namesEqual(bindingOperation.getName(), operation.getName()))
              {
                foundMatch = true;
                break;
              }
            }

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

          // Remove any Operations which already exists in bindingOperations.  What we
          // have left are the Operations which needs newly created BindingOperations
          List bindingOperationsNeeded = new ArrayList();
          for (int index = 0; index < operations.size(); index++)
          {
            Operation operation = (Operation)operations.get(index);

            boolean foundMatch = false;
            Iterator bindingOperationsIt = bindingOperations.iterator();
            while (bindingOperationsIt.hasNext())
            {
              BindingOperation bindingOperation = (BindingOperation)bindingOperationsIt.next();

              if (namesEqual(bindingOperation.getName(), operation.getName()))
              {
                foundMatch = true;
                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.