Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLOperation


            AxisOperation axisOperation = (AxisOperation) operations.next();
            if (axisOperation.isControlOperation()) {
                //we do not need to expose control operation in the WSDL
                continue;
            }
            WSDLOperation wsdlOperation = womDescription.createOperation();
            wsdlOperation.setName(axisOperation.getName());

            AxisMessage inaxisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            if (inaxisMessage != null) {
                MessageReference messageRefinput = wsdlComponentFactory.createMessageReference();
                messageRefinput.setElementQName(inaxisMessage.getElementQName());
                messageRefinput.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                wsdlOperation.setInputMessage(messageRefinput);
            }

            try {
                AxisMessage outaxisMessage = axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                if (outaxisMessage != null && outaxisMessage.getElementQName() != null) {
                    MessageReference messageRefout = wsdlComponentFactory.createMessageReference();
                    messageRefout.setElementQName(outaxisMessage.getElementQName());
                    messageRefout.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                    wsdlOperation.setOutputMessage(messageRefout);
                }
            } catch (UnsupportedOperationException e) {
                // operation does not have an out message so , no need to do anything here
            }
            portType.setOperation(wsdlOperation);
View Full Code Here


        binding.addExtensibilityElement(soapbindingImpl);

        Iterator op_itr = portType.getOperations().keySet().iterator();
        while (op_itr.hasNext()) {
            String opName = (String) op_itr.next();
            WSDLOperation wsdlOperation = portType.getOperation(opName);
            MessageReference inMessage = wsdlOperation.getInputMessage();

            WSDLBindingOperation bindingoperation = wsdlComponentFactory.createWSDLBindingOperation();
            bindingoperation.setName(new QName(opName));
            bindingoperation.setOperation(wsdlOperation);
            binding.addBindingOperation(bindingoperation);

            SOAPOperation soapOpimpl = (SOAPOperation) extensionFactory.getExtensionElement(
                    ExtensionConstants.SOAP_11_OPERATION);
            soapOpimpl.setStyle(style);
            //to do heve to set a proper SOAPAction
            soapOpimpl.setSoapAction(opName);
            bindingoperation.addExtensibilityElement(soapOpimpl);
            if (inMessage != null) {
                WSDLBindingMessageReference bindingInMessage = wsdlComponentFactory.createWSDLBindingMessageReference();
                bindingInMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                bindingoperation.setInput(bindingInMessage);

                SOAPBody requestSoapbody = (SOAPBody) extensionFactory.getExtensionElement(
                        ExtensionConstants.SOAP_11_BODY);
                requestSoapbody.setUse(use);
                //todo need to fix this
                requestSoapbody.setNamespaceURI(namespeceURI);
                bindingInMessage.addExtensibilityElement(requestSoapbody);
            }

            MessageReference outMessage = wsdlOperation.getOutputMessage();
            if (outMessage != null) {
                WSDLBindingMessageReference bindingOutMessage = wsdlComponentFactory.createWSDLBindingMessageReference();

                bindingOutMessage.setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                bindingoperation.setOutput(bindingOutMessage);
View Full Code Here

                WSDLExtensibilityElement element = (WSDLExtensibilityElement) extIterator.next();
                if (ExtensionConstants.SOAP_11_OPERATION.equals(element.getType())||
                        ExtensionConstants.SOAP_12_OPERATION.equals(element.getType())) {
                    if (((SOAPOperation) element).getSoapAction().equals(
                            soapAction)) {
                        WSDLOperation op = bindingOperation.getOperation();
                        if (op instanceof OperationDescription) {
                            operation = (OperationDescription) op;
                            count++;
                        }
                    }
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

                //todo
                // op_descrip.setMessageExchangePattern(mep);
            }

            String opname = op_name_att.getAttributeValue();
            WSDLOperation wsdlOperation = service.getWSDLOPOperation(new QName(opname));
//            AxisOperation op_descrip = service.getOperation(new QName(opname));
            AxisOperation op_descrip;
            if (wsdlOperation == null) {
                if (mepurl == null) {
                    // assumed MEP is in-out
                    op_descrip = new InOutAxisOperation();
                } else {
                    op_descrip = AxisOperationFactory.getOperetionDescription(mepurl);
                }
//                op_descrip = new AxisOperation();
                op_descrip.setName(new QName(opname));
                log.info(Messages.getMessage(DeploymentErrorMsgs.OP_NOT_FOUN_IN_WSDL, opname));
            } else {
                //craeting opeartion from existing opeartion
                String mep = wsdlOperation.getMessageExchangePattern();
                if (mep == null) {
                    op_descrip = new InOutAxisOperation(wsdlOperation);
                } else {
                    op_descrip = AxisOperationFactory.getOperetionDescription(mep);
                    op_descrip.setWsdlopeartion((WSDLOperationImpl) wsdlOperation);
View Full Code Here

        if (bindingPolicy != null) {
            list.add(bindingPolicy);
        }

        // wsdl:portType/wsdl:operation
        WSDLOperation wsdlOperation = bindingOperation.getOperation();
        Assertion interfacePolicy = getPolicyFromComponent(wsdlOperation);

        if (interfacePolicy != null) {
            list.add(interfacePolicy);
View Full Code Here

        if (bindingInputPolicy != null) {
            policies.add(bindingInputPolicy);
        }

        // wsdl:portType/wsdl:operation/wsdl:input
        WSDLOperation wsdlOperation = wsdlBindingOperation.getOperation();
        MessageReference operationInput = wsdlOperation.getInputMessage();
        Policy operationInputPolicy = getSinglePolicy(getPoliciesAsExtensibilityAttribute(operationInput));
        if (operationInputPolicy != null) {
            policies.add(operationInputPolicy);
        }
View Full Code Here

        if (bindingOutputPolicy != null) {
            policies.add(getPolicyFromComponent(bindingOutput));
        }

        // wsdl:portType/wsdl:operation/wsdl:output
        WSDLOperation wsdlOperation = wsdlBindingOperation.getOperation();
        MessageReference operationOutput = wsdlOperation.getOutputMessage();
        Policy operationOutputPolicy = getSinglePolicy(getPoliciesAsExtensibilityAttribute(operationOutput));
        if (operationOutputPolicy != null) {
            policies.add(operationOutputPolicy);
        }
View Full Code Here

    private void registerPoliciesInWSDLInterface(WSDLInterface wsdlInterface) {
        registerPoliciesInElement(wsdlInterface);
        Iterator iterator = wsdlInterface.getOperations().values().iterator();
        while (iterator.hasNext()) {
            WSDLOperation wsdlOperation = (WSDLOperation) iterator.next();
            registerPoliciesInWSDLOperation(wsdlOperation);
        }
    }
View Full Code Here

      WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
      wsdlInterface = wsdlBinding.getBoundInterface();

      for (Iterator iterator = wsdlInterface.getOperations().values()
          .iterator(); iterator.hasNext();) {
        WSDLOperation wsdlOperation = (WSDLOperation) iterator.next();
        Policy policy = util.getPolicyForOperation(wsdlEndpoint.getName(),
            wsdlOperation.getName());

        if (policy != null) {
          processPolicies(document, rootElement, policy,
              wsdlEndpoint, wsdlOperation);
        }
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.