Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLBindingOperation


        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);

            SOAPOperationImpl soapOpimpl = new SOAPOperationImpl();
            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(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                bindingoperation.setInput(bindingInMessage);
                SOAPBodyImpl requestSoapbody = new SOAPBodyImpl();
                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(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                bindingoperation.setOutput(bindingOutMessage);
                SOAPBodyImpl resSoapbody = new SOAPBodyImpl();
                resSoapbody.setUse(use);
                resSoapbody.setNamespaceURI(namespeceURI);
                bindingOutMessage.addExtensibilityElement(resSoapbody);
            }
View Full Code Here


            throw new WSDLProcessingException("Interface/PortType not found for the Binding :"
                    + wsdlBinding.getName());
        wsdlBinding.setBoundInterface(wsdlInterface);
        Iterator bindingoperationsIterator =
                wsdl4JBinding.getBindingOperations().iterator();
        WSDLBindingOperation wsdlBindingOperation;
        BindingOperation wsdl4jBindingOperation;
        while (bindingoperationsIterator.hasNext()) {
            wsdlBindingOperation =
                    this.wsdlComponentFactory.createWSDLBindingOperation();
            wsdl4jBindingOperation =
                    (BindingOperation) bindingoperationsIterator.next();
            this.populateBindingOperation(wsdlBindingOperation,
                    wsdl4jBindingOperation,
                    wsdl4JBinding.getQName().getNamespaceURI(), wsdl4jDefinition);
            wsdlBindingOperation.setOperation(
                    wsdlInterface.getOperation(
                            wsdl4jBindingOperation.getOperation().getName()));
            copyExtensibleElements(
                    wsdl4jBindingOperation.getExtensibilityElements(),
                    wsdlBindingOperation, wsdl4jDefinition);
View Full Code Here

        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);

            SOAPOperationImpl soapOpimpl = new SOAPOperationImpl();
            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(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
                bindingoperation.setInput(bindingInMessage);
                SOAPBodyImpl requestSoapbody = new SOAPBodyImpl();
                requestSoapbody.setUse(use);
                //todo need to fix this
                requestSoapbody.setNamespaceURI(namespaceURI);
                bindingInMessage.addExtensibilityElement(requestSoapbody);
            }

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

                bindingOutMessage.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                bindingoperation.setOutput(bindingOutMessage);
                SOAPBodyImpl resSoapbody = new SOAPBodyImpl();
                resSoapbody.setUse(use);
                resSoapbody.setNamespaceURI(namespaceURI);
                bindingOutMessage.addExtensibilityElement(resSoapbody);
            }
View Full Code Here

        // let us configure the complete AxisService out of this, not the
        // current the Operation only
        Iterator bindings = binding.getBindingOperations().values().iterator();

        while (bindings.hasNext()) {
            WSDLBindingOperation wsdlbop = (WSDLBindingOperation) bindings
                    .next();
            serviceDesc.addOperation(configureOperation(wsdlbop));
        }

        return serviceDesc;
View Full Code Here

    addPolicyAsExtElements(description, policyList, wsdlBinding,
        policyInclude);

    Iterator wsdlOperations = wsdlBinding.getBindingOperations().values()
        .iterator();
    WSDLBindingOperation wsdlBindingOperation;

    while (wsdlOperations.hasNext()) {
      wsdlBindingOperation = (WSDLBindingOperation) wsdlOperations.next();
      populatePolicy(description, wsdlBindingOperation, axisService
          .getOperation(wsdlBindingOperation.getName()));
    }
  }
View Full Code Here

        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);

            AxisOperation axisOperation = axisService.getOperation(new QName(
                    opName));
            include = axisOperation.getPolicyInclude();

            // adding policies defined in operation element in services.xml
            policyElementsList = include
                    .getPolicyElements(PolicyInclude.AXIS_OPERATION_POLICY);
            addPolicyAsExtElements(womDescription, policyElementsList,
                    bindingoperation, include);

            // adding policies defined in wsdl:binding -> wsdl:operation
            policyElementsList = include
                    .getPolicyElements(PolicyInclude.BINDING_OPERATION_POLICY);
            addPolicyAsExtElements(womDescription, policyElementsList,
                    bindingoperation, include);

            binding.addBindingOperation(bindingoperation);

            SOAPOperation soapOpimpl = (SOAPOperation) extensionFactory
                    .getExtensionElement(ExtensionConstants.SOAP_11_OPERATION);
            soapOpimpl.setStyle(style);
            // to do heve to set a proper SOAPAction
            ArrayList wsamappingList = axisOperation.getWsamappingList();
            if (wsamappingList != null && wsamappingList.size() > 0) {
                soapOpimpl.setSoapAction((String) wsamappingList.get(0));
            } else {
                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);
                requestSoapbody.setNamespaceURI(namespeceURI);
                bindingInMessage.addExtensibilityElement(requestSoapbody);

                AxisMessage axisInMessage = axisOperation
                        .getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                include = axisInMessage.getPolicyInclude();

                // adding policies defined in message element in services.xml
                policyElementsList = include
                        .getPolicyElements(PolicyInclude.AXIS_MESSAGE_POLICY);
                addPolicyAsExtElements(womDescription, policyElementsList,
                        inMessage, include);

                // adding policies defined in wsdl:binding -> wsdl:operation ->
                // wsdl:input
                policyElementsList = include
                        .getPolicyElements(PolicyInclude.BINDING_INPUT_POLICY);
                addPolicyAsExtElements(womDescription, policyElementsList,
                        inMessage, include);

            }

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

                bindingOutMessage
                        .setDirection(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
                bindingoperation.setOutput(bindingOutMessage);
                SOAPBody resSoapbody = (SOAPBody) extensionFactory
                        .getExtensionElement(ExtensionConstants.SOAP_11_BODY);
                resSoapbody.setUse(use);
                resSoapbody.setNamespaceURI(namespeceURI);
                bindingOutMessage.addExtensibilityElement(resSoapbody);
View Full Code Here

            throw new WSDLProcessingException("Interface/PortType not found for the Binding :"
                    + wsdlBinding.getName());
        wsdlBinding.setBoundInterface(wsdlInterface);
        Iterator bindingoperationsIterator =
                wsdl4JBinding.getBindingOperations().iterator();
        WSDLBindingOperation wsdlBindingOperation;
        BindingOperation wsdl4jBindingOperation;
        while (bindingoperationsIterator.hasNext()) {
            wsdlBindingOperation =
                    this.wsdlComponentFactory.createWSDLBindingOperation();
            wsdl4jBindingOperation =
                    (BindingOperation) bindingoperationsIterator.next();

            //for the namespace we should pick the namespace from the porttype
            //not the binding since the portyype can be imported and then the
            //namespaces of the binding and porttype can differ

            PortType portType = wsdl4JBinding.getPortType();
            String namespaceURI = "";
            if (portType!=null){
                namespaceURI = portType.getQName().getNamespaceURI();
            }else{
                namespaceURI = wsdl4JBinding.getQName().getNamespaceURI();
            }

            this.populateBindingOperation(wsdlBindingOperation,
                    wsdl4jBindingOperation,
                    namespaceURI,
                    wsdl4jDefinition);
            wsdlBindingOperation.setOperation(
                    wsdlInterface.getOperation(
                            wsdl4jBindingOperation.getOperation().getName()));
            copyExtensibleElements(
                    wsdl4jBindingOperation.getExtensibilityElements(),
                    wsdlBindingOperation, wsdl4jDefinition);
View Full Code Here

        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);
                SOAPBody resSoapbody = (SOAPBody) extensionFactory.getExtensionElement(
                        ExtensionConstants.SOAP_11_BODY);
                resSoapbody.setUse(use);
                resSoapbody.setNamespaceURI(namespeceURI);
                bindingOutMessage.addExtensibilityElement(resSoapbody);
View Full Code Here

        // let us configure the complete AxisService out of this, not the current the Operation only
        Iterator bindings = binding.getBindingOperations().values().iterator();

        while (bindings.hasNext()) {
            WSDLBindingOperation wsdlbop = (WSDLBindingOperation) bindings.next();
            WSDLOperation wsdlop = wsdlbop.getOperation();
            AxisOperation axisOp = AxisOperationFactory.getAxisOperation(findMEP(wsdlop));

            axisOp.setName(wsdlop.getName());
            serviceDesc.addOperation(axisOp);
        }

        // TODO: This part is compelte mess .. I think we need to look closly at the ServiceGroups  ..time been this works
        configurationContext.getAxisConfiguration().addService(serviceDesc);

        AxisServiceGroup serviceGroup =
                new AxisServiceGroup(configurationContext.getAxisConfiguration());
        ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext,
                serviceGroup);
        ServiceContext serviceContext = new ServiceContext(serviceDesc, serviceGroupContext);
        WSDLOperation wsdlop = getOperation(operationname, endpoint);
        WSDLBindingOperation bop = binding.getBindingOperation(wsdlop.getName());
        Iterator elments = bop.getExtensibilityElements().iterator();

        while (elments.hasNext()) {
            Object obj = elments.next();

            if (obj instanceof SOAPOperation) {
View Full Code Here

        addPolicyAsExtElements(description, policyList, wsdlBinding,
                policyInclude);

        Iterator wsdlOperations = wsdlBinding.getBindingOperations().values()
                .iterator();
        WSDLBindingOperation wsdlBindingOperation;

        while (wsdlOperations.hasNext()) {
            wsdlBindingOperation = (WSDLBindingOperation) wsdlOperations.next();
            populatePolicy(description, wsdlBindingOperation, axisService
                    .getOperation(wsdlBindingOperation.getName()));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLBindingOperation

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.