Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLOperation


                                   WSDLBinding binding,
                                   String mep) {
        Collection col = boundInterface.getOperations().values();
        String portTypeName = getCoreClassName(boundInterface);
        Element methodElement;
        WSDLOperation operation = null;
        boolean opsFound = false;
        for (Iterator iterator = col.iterator(); iterator.hasNext();) {
            operation = (WSDLOperation) iterator.next();
            if (mep==null){
                //at this point we know it's true
                opsFound = true;

                List soapHeaderInputParameterList = new ArrayList();
                List soapHeaderOutputParameterList = new ArrayList();
                methodElement = doc.createElement("method");
                String localPart = operation.getName().getLocalPart();

                addAttribute(doc, "name", localPart, methodElement);
                addAttribute(doc, "namespace", operation.getName().getNamespaceURI(), methodElement);
                addAttribute(doc, "style", operation.getStyle(), methodElement);
                addAttribute(doc, "dbsupportname", portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
                        methodElement);

                addAttribute(doc, "mep", operation.getMessageExchangePattern(), methodElement);

                if (null != binding) {
                    WSDLBindingOperation bindingOperation = binding.getBindingOperation(operation.getName());

                    // todo This can be a prob !!!!!
                    if (bindingOperation != null) {
                        addSOAPAction(doc, methodElement, bindingOperation);
                        addHeaderOperations(soapHeaderInputParameterList, bindingOperation, true);
                        addHeaderOperations(soapHeaderOutputParameterList, bindingOperation, false);
                    }
                }

                /*
                 * Setting the policy of the operation
                 */
                WSDLEndpoint endpoint = infoHolder.getPort();

                if (endpoint != null) {
                  Policy policy = attachmentUtil.getOperationPolicy(endpoint.getName(), operation.getName());

                  if (policy != null) {
                    addAttribute(doc, "policy", PolicyUtil.getPolicyAsString(policy), methodElement);
                  }
                }


                methodElement.appendChild(getInputElement(doc, operation, soapHeaderInputParameterList));
                methodElement.appendChild(getOutputElement(doc, operation, soapHeaderOutputParameterList));
                rootElement.appendChild(methodElement);
                //////////////////////
            }else{
                //mep is present - we move ahead only if the given mep matches the mep of this operation

                if (mep.equals(operation.getMessageExchangePattern())){
                    //at this point we know it's true
                    opsFound = true;
                    List soapHeaderInputParameterList = new ArrayList();
                    List soapHeaderOutputParameterList = new ArrayList();
                    methodElement = doc.createElement("method");
                    String localPart = operation.getName().getLocalPart();

                    addAttribute(doc, "name", localPart, methodElement);
                    addAttribute(doc, "namespace", operation.getName().getNamespaceURI(), methodElement);
                    addAttribute(doc, "style", operation.getStyle(), methodElement);
                    addAttribute(doc, "dbsupportname", portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
                            methodElement);

                    addAttribute(doc, "mep", operation.getMessageExchangePattern(), methodElement);

                    if (null != binding) {
                        WSDLBindingOperation bindingOperation = binding.getBindingOperation(operation.getName());

                        // todo This can be a prob !!!!!
                        if (bindingOperation != null) {
                            addSOAPAction(doc, methodElement, bindingOperation);
                            addHeaderOperations(soapHeaderInputParameterList, bindingOperation, true);
                            addHeaderOperations(soapHeaderOutputParameterList, bindingOperation, false);
                        }
                    }

                    /*
                     * Setting the policy of the operation
                     */
                    WSDLEndpoint endpoint = infoHolder.getPort();
                    Policy policy = attachmentUtil.getOperationPolicy(endpoint.getName(), operation.getName());

                    if (policy != null) {
                      addAttribute(doc, "policy", PolicyUtil.getPolicyAsString(policy), methodElement);
                    }

View Full Code Here


     */
    private void loadOperations(WSDLInterface boundInterface, Document doc, Element rootElement, WSDLBinding binding) {
        Collection col = boundInterface.getOperations().values();
        String portTypeName = getCoreClassName(boundInterface);
        Element methodElement;
        WSDLOperation operation;

        for (Iterator iterator = col.iterator(); iterator.hasNext();) {
            List soapHeaderInputParameterList = new ArrayList();
            List soapHeaderOutputParameterList = new ArrayList();

            operation = (WSDLOperation) iterator.next();
            methodElement = doc.createElement("method");

            String localPart = operation.getName().getLocalPart();

            addAttribute(doc, "name", localPart, methodElement);
            addAttribute(doc, "namespace", operation.getName().getNamespaceURI(), methodElement);
            addAttribute(doc, "style", operation.getStyle(), methodElement);
            addAttribute(doc, "dbsupportname", portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
                    methodElement);
            addAttribute(doc, "mep", operation.getMessageExchangePattern(), methodElement);

            if (null != binding) {
                WSDLBindingOperation bindingOperation = binding.getBindingOperation(operation.getName());

                // todo This can be a prob !!!!!
                if (bindingOperation != null) {
                    addSOAPAction(doc, methodElement, bindingOperation);
                    addHeaderOperations(soapHeaderInputParameterList, bindingOperation, true);
View Full Code Here

        } else {
            Iterator superIterator =
                    this.superInterfaces.values().iterator();
            Iterator operationIterator;
            WSDLInterface superInterface;
            WSDLOperation superInterfaceOperation;
            Iterator thisIterator = all.values().iterator();
            WSDLOperation thisOperation;
            boolean tobeAdded = false;
            while (superIterator.hasNext()) {
                superInterface = (WSDLInterface) superIterator.next();
                operationIterator =
                superInterface.getAllOperations().values().iterator();
                while (operationIterator.hasNext()) {
                    superInterfaceOperation =
                    (WSDLOperation) operationIterator.next();
                    tobeAdded = true;
                    while (thisIterator.hasNext()) {
                        thisOperation = (WSDLOperation) thisIterator.next();
                        if ((thisOperation.getName() == superInterfaceOperation.getName())
                                && !tobeAdded) {
                            if (thisOperation.getTargetnamespace().equals(
                                    superInterfaceOperation.getTargetnamespace())) {

                                // Both are the same Operation; the one inherited and
                                // the one that is already in the map(may or maynot be inherited)
                                tobeAdded = false;
View Full Code Here

        } else {
            Iterator superIterator =
                    this.superInterfaces.values().iterator();
            Iterator operationIterator;
            WSDLInterface superInterface;
            WSDLOperation superInterfaceOperation;
            Iterator thisIterator = all.values().iterator();
            WSDLOperation thisOperation;
            boolean tobeAdded = false;
            while (superIterator.hasNext()) {
                superInterface = (WSDLInterface) superIterator.next();
                operationIterator =
                        superInterface.getAllOperations().values().iterator();
                while (operationIterator.hasNext()) {
                    superInterfaceOperation =
                            (WSDLOperation) operationIterator.next();
                    tobeAdded = true;
                    while (thisIterator.hasNext()) {
                        thisOperation = (WSDLOperation) thisIterator.next();
                        if ((thisOperation.getName() ==
                                superInterfaceOperation.getName())
                                && !tobeAdded) {
                            if (thisOperation.getTargetnamespace().equals(
                                    superInterfaceOperation.getTargetnamespace())) {

                                // Both are the same Operation; the one inherited and
                                // the one that is already in the map(may or maynot be inherited)
                                tobeAdded = false;
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLOperation

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.