Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLBinding


        womDescription.addInterface(portType);

        QName bindingName = new QName(targentNamespece, serviceName + "Binding"
                , targetNamespecheprefix);
        //generating binding
        WSDLBinding binding = generateBinding(wsdlComponentFactory,
                portType,
                bindingName,
                "document", "literal", "http://schemas.xmlsoap.org/soap/http",
                "http://www.org.apache.axis2");
        womDescription.addBinding(binding);
View Full Code Here


                                        WSDLInterface portType, QName bindingName,
                                        String style,
                                        String use,
                                        String trsportURI,
                                        String namespeceURI) {
        WSDLBinding binding = wsdlComponentFactory.createBinding();
        binding.setBoundInterface(portType);
        binding.setName(bindingName);

        SOAPBindingImpl soapbindingImpl = new SOAPBindingImpl();
        soapbindingImpl.setStyle(style);
        soapbindingImpl.setTransportURI(trsportURI);
        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);

            SOAPOperationImpl soapOpimpl = new SOAPOperationImpl();
            soapOpimpl.setStyle(style);
            //to do heve to set a proper SOAPAction
            soapOpimpl.setSoapAction(opName);
View Full Code Here

        // map of WSDLBinding elements. At this point we need to do some extra work since there
        //can be header parameters

        Iterator bindingIterator = wsdl4JDefinition.getBindings().values()
                .iterator();
        WSDLBinding wsdlBinding;
        Binding wsdl4jBinding;
        while (bindingIterator.hasNext()) {
            wsdlBinding = this.wsdlComponentFactory.createBinding();
            wsdl4jBinding = (Binding) bindingIterator.next();
            this.populateBindings(wsdlBinding, wsdl4jBinding, wsdl4JDefinition);
View Full Code Here

     */
    protected void writeBinding(WSDLDescription desc) throws XMLStreamException, IOException {
        Map bindingsMap = desc.getBindings();
        if (!bindingsMap.isEmpty()) {
            Iterator iterator = bindingsMap.values().iterator();
            WSDLBinding binding;
            while (iterator.hasNext()) {
                binding = (WSDLBinding) iterator.next();
                writer.writeStartElement(defaultWSDLPrefix, BINDING_NAME, WSDL1_1_NAMESPACE_URI);
                writer.writeAttribute("name", binding.getName().getLocalPart());
                writer.writeAttribute("type", targetNamespacePrefix + ":" + binding.getBoundInterface().getName().getLocalPart());
                //write the extensibility elements
                handleExtensibiltyElements(binding.getExtensibilityElements());
                //write the operations

                Map bindingOps = binding.getBindingOperations();
                if (bindingOps != null && !bindingOps.isEmpty()) {
                    Iterator bindingOpsIterator = bindingOps.values().iterator();
                    while (bindingOpsIterator.hasNext()) {
                        writebindingOperation((WSDLBindingOperation) bindingOpsIterator.next());
                    }
View Full Code Here

        QName bindingName = new QName(targetNamespace, serviceName + BINDING_NAME_SUFFIX
                , targetNamespacePrefix);

        //generating binding. Our bidings are strictly doc/lit, atleast for now
        WSDLBinding binding = generateBinding(wsdlComponentFactory,
                portType,
                bindingName,
                //todo these need to be constants
                "document",
                "literal",
View Full Code Here

                                        WSDLInterface portType, QName bindingName,
                                        String style,
                                        String use,
                                        String transportURI,
                                        String namespaceURI) {
        WSDLBinding binding = wsdlComponentFactory.createBinding();
        binding.setBoundInterface(portType);
        binding.setName(bindingName);

        SOAPBindingImpl soapbindingImpl = new SOAPBindingImpl();
        soapbindingImpl.setStyle(style);
        soapbindingImpl.setTransportURI(transportURI);
        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);

            SOAPOperationImpl soapOpimpl = new SOAPOperationImpl();
            soapOpimpl.setStyle(style);
            //to do heve to set a proper SOAPAction
            soapOpimpl.setSoapAction(opName);
View Full Code Here

                SOAPAddress soapAddress = (SOAPAddress) obj;
                clientOptions.setTo(new EndpointReference(soapAddress.getLocationURI()));
            }
        }

        WSDLBinding binding = endpoint.getBinding();

        // 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));
View Full Code Here

    List policyList = policyInclude
        .getPolicyElements(PolicyInclude.PORT_POLICY);
    addPolicyAsExtElements(description, policyList, wsdlEndpoint,
        policyInclude);

    WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
    populatePolicy(description, wsdlBinding, axisService);
    WSDLInterface wsdlInterface = wsdlBinding.getBoundInterface();
    populatePolicy(description, wsdlInterface, axisService);

  }
View Full Code Here

        womDescription.addInterface(portType);

        QName bindingName = new QName(targetNamespece, axisService.getName()
                + "Binding", targetNamespecheprefix);
        // generating binding
        WSDLBinding binding = generateBinding(wsdlComponentFactory, portType,
                bindingName, "document", "literal",
                Constants.URI_SOAP11_HTTP,
                "http://www.org.apache.axis2");
        womDescription.addBinding(binding);
View Full Code Here

    private WSDLBinding generateBinding(
            WSDLComponentFactory wsdlComponentFactory, WSDLInterface portType,
            QName bindingName, String style, String use, String trsportURI,
            String namespeceURI) {

        WSDLBinding binding = wsdlComponentFactory.createBinding();

        ExtensionFactory extensionFactory = wsdlComponentFactory
                .createExtensionFactory();

        binding.setBoundInterface(portType);
        binding.setName(bindingName);

        PolicyInclude include;
        ArrayList policyElementsList;

        include = axisService.getPolicyInclude();

        // adding policies defined in services.xml
        policyElementsList = include
                .getPolicyElements(PolicyInclude.AXIS_SERVICE_POLICY);
        addPolicyAsExtElements(womDescription, policyElementsList, binding,
                include);

        // adding policies defined in wsdl:binding
        policyElementsList = include
                .getPolicyElements(PolicyInclude.BINDING_POLICY);
        addPolicyAsExtElements(womDescription, policyElementsList, binding,
                include);

        SOAPBinding soapbindingImpl = (SOAPBinding) extensionFactory
                .getExtensionElement(ExtensionConstants.SOAP_11_BINDING);
        soapbindingImpl.setStyle(style);
        soapbindingImpl.setTransportURI(trsportURI);
        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);

            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
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLBinding

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.