Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPBinding


        }
        def.addBinding(binding);
    }
    private static void createSoapExtension(boolean soap11, Binding binding) {
        if (soap11) {
            SOAPBinding soap = new SOAPBindingImpl();
            soap.setTransportURI("http://schemas.xmlsoap.org/soap/http");
            soap.setStyle("document");
            binding.addExtensibilityElement(soap);
        } else {
            SOAP12Binding soap = new SOAP12BindingImpl();
            soap.setTransportURI("http://schemas.xmlsoap.org/soap/http");
            soap.setStyle("document");
            binding.addExtensibilityElement(soap);
        }
    }
View Full Code Here


    }
   
    public void checkBindings() {
        for (Iterator itBd = definition.getBindings().values().iterator(); itBd.hasNext();) {
            Binding binding = (Binding) itBd.next();
            SOAPBinding soapBinding = WSDLUtils.getExtension(binding, SOAPBinding.class);
           
            // R2401
            if (soapBinding == null) {
                error(Code.R2401, binding);
                continue;
            }
           
            // R2701 R2702
            if (soapBinding.getTransportURI() == null) {
                error(Code.R2701, binding);
            } else if (!"http://schemas.xmlsoap.org/soap/http".equals(soapBinding.getTransportURI())) {
                error(Code.R2702, binding);
            }
           
            // R2706
            for (Iterator itBop = binding.getBindingOperations().iterator(); itBop.hasNext();) {
                BindingOperation bop = (BindingOperation) itBop.next();
                if (!ensureLiteral(bop)) {
                    error(Code.R2706, binding);
                    break;
                }
            }
           
            // R2705
            Style bindingStyle = null;
            for (Iterator itBop = binding.getBindingOperations().iterator(); itBop.hasNext();) {
                BindingOperation bop = (BindingOperation) itBop.next();
                SOAPOperation soapBop = WSDLUtils.getExtension(bop, SOAPOperation.class);
                Style opStyle = soapBop != null ? getStyle(soapBop.getStyle()) : null;
                if (opStyle == null) {
                    opStyle = getStyle(soapBinding.getStyle());
                    if (opStyle == null) {
                        opStyle = Style.DOCUMENT;
                    }
                }
                if (bindingStyle == null) {
View Full Code Here

        }
        javax.wsdl.Binding wsdlBinding = wsdlPort.getBinding();
        for (Iterator iter = wsdlBinding.getExtensibilityElements().iterator(); iter.hasNext();) {
            ExtensibilityElement element = (ExtensibilityElement) iter.next();
            if (element instanceof SOAPBinding) {
                SOAPBinding soapBinding = (SOAPBinding) element;
                binding.setTransportURI(soapBinding.getTransportURI());
                binding.setStyle(getStyle(soapBinding.getStyle()));
            } else {
                //throw new IllegalStateException("Unrecognized extension: " + QNameUtil.toString(element.getElementType()));
            }
        }
        PortType wsdlPortType = wsdlBinding.getPortType();
View Full Code Here

        binding.setQName(new QName(def.getTargetNamespace(), bindingName));
        binding.setPortType(portType);
        binding.setUndefined(false);
        // Create soap extension
        if (soap11) {
            SOAPBinding soap = new SOAPBindingImpl();
            soap.setTransportURI("http://schemas.xmlsoap.org/soap/http");
            soap.setStyle("document");
            binding.addExtensibilityElement(soap);
        } else {
            SOAP12Binding soap = new SOAP12BindingImpl();
            soap.setTransportURI("http://schemas.xmlsoap.org/soap/http");
            soap.setStyle("document");
            binding.addExtensibilityElement(soap);
        }
        // Create operations
        List<?> operations = portType.getOperations();
        for (Iterator<?> iter = operations.iterator(); iter.hasNext();) {
View Full Code Here

    public Binding createBinding(Definition definition, PortType portType) {
        try {
            Binding binding = definition.createBinding();
            binding.setPortType(portType);
            configureBinding(binding, portType);
            SOAPBinding soapBinding =
                (SOAPBinding)definition.getExtensionRegistry().createExtension(Binding.class, SOAP_BINDING);
            soapBinding.setStyle("document");
            soapBinding.setTransportURI("http://schemas.xmlsoap.org/soap/http");
            binding.addExtensibilityElement(soapBinding);

            createBindingOperations(definition, binding, portType);
            binding.setUndefined(false);
            definition.addBinding(binding);
View Full Code Here

            Iterator extensibilityElementsIterator = binding.getExtensibilityElements().iterator();
            while (extensibilityElementsIterator.hasNext()) {
                Object obj = extensibilityElementsIterator.next();
                if (obj instanceof SOAPBinding) {
                    bindingType = BindingEntry.TYPE_SOAP;
                    SOAPBinding sb = (SOAPBinding) obj;
                    String style = sb.getStyle();
                    if ("rpc".equalsIgnoreCase(style)) {
                        bindingStyle = BindingEntry.STYLE_RPC;
                    }
                }
                else if (obj instanceof HTTPBinding) {
View Full Code Here

        // Create a binding
        binding = def.createBinding();
        binding.setUndefined(false);
        binding.setQName(bindingQName);

        SOAPBinding soapBinding = new SOAPBindingImpl();
        String modeStr = (mode == MODE_RPC) ? "rpc" : "document";
        soapBinding.setStyle(modeStr);
        soapBinding.setTransportURI(Constants.URI_SOAP11_HTTP);

        binding.addExtensibilityElement(soapBinding);

        if (add) {
            def.addBinding(binding);
View Full Code Here

        }
        return service;
    }

    private Style getStyle(Binding binding) throws DeploymentException {
        SOAPBinding soapBinding = (SOAPBinding) SchemaInfoBuilder.getExtensibilityElement(SOAPBinding.class, binding.getExtensibilityElements());
//            String transportURI = soapBinding.getTransportURI();
        String portStyleString = soapBinding.getStyle();
        return Style.getStyle(portStyleString);
    }
View Full Code Here

            Iterator extensibilityElementsIterator = binding.getExtensibilityElements().iterator();
            while (extensibilityElementsIterator.hasNext()) {
                Object obj = extensibilityElementsIterator.next();
                if (obj instanceof SOAPBinding) {
                    bindingType = BindingEntry.TYPE_SOAP;
                    SOAPBinding sb = (SOAPBinding) obj;
                    String style = sb.getStyle();
                    if ("rpc".equalsIgnoreCase(style)) {
                        bindingStyle = BindingEntry.STYLE_RPC;
                    }
                }
                else if (obj instanceof HTTPBinding) {
View Full Code Here

        // Create a binding
        binding = def.createBinding();
        binding.setUndefined(false);
        binding.setQName(bindingQName);

        SOAPBinding soapBinding = new SOAPBindingImpl();
        String modeStr = (mode == MODE_RPC) ? "rpc" : "document";
        soapBinding.setStyle(modeStr);
        soapBinding.setTransportURI(Constants.URI_SOAP11_HTTP);

        binding.addExtensibilityElement(soapBinding);

        if (add) {
            def.addBinding(binding);
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap.SOAPBinding

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.