Package javax.wsdl

Examples of javax.wsdl.Binding


                GerPortType port = portCompletion.getPort();
                URL location = getLocation(port);
                String portName = port.getPortName().trim();
                String bindingName = portCompletion.getBindingName().trim();
                QName bindingQName = new QName(namespace, bindingName);
                Binding binding = definition.getBinding(bindingQName);
                if (binding == null) {
                    throw new DeploymentException("No binding found with qname: " + bindingQName);
                }
                String credentialsName = port.isSetCredentialsName() ? port.getCredentialsName().trim() : null;
                mapBinding(binding, mapping, serviceQName, classLoader, soapVersion, schemaInfoBuilder, portName, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName, exceptionMap);

            }
        } else {
            //full wsdl
            if (serviceRefType != null && serviceRefType.isSetServiceCompletion()) {
                throw new DeploymentException("Full wsdl, but service completion supplied");
            }
            //organize the extra port info
            Map portMap = new HashMap();
            if (serviceRefType != null) {
                GerPortType[] ports = serviceRefType.getPortArray();
                for (int i = 0; i < ports.length; i++) {
                    GerPortType port = ports[i];
                    String portName = port.getPortName().trim();
                    portMap.put(portName, port);
                }
            }

            //find the service we are working with
            javax.wsdl.Service service = getService(serviceQName, schemaInfoBuilder.getDefinition());
            if (serviceQName == null) {
                serviceQName = service.getQName();
            }

            Map wsdlPortMap = service.getPorts();
            for (Iterator iterator = wsdlPortMap.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry = (Map.Entry) iterator.next();
                String portName = (String) entry.getKey();
                Port port = (Port) entry.getValue();

                GerPortType gerPort = (GerPortType) portMap.get(portName);

                URL location = gerPort == null ? getAddressLocation(port) : getLocation(gerPort);
                //skip non-soap ports
                if (location == null) {
                    continue;
                }
                String credentialsName = gerPort == null || gerPort.getCredentialsName() == null ? null : gerPort.getCredentialsName().trim();

                Binding binding = port.getBinding();

                mapBinding(binding, mapping, serviceQName, classLoader, soapVersion, schemaInfoBuilder, portName, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName, exceptionMap);
            }
        }
    }
View Full Code Here


            throw new ToolException("Service " + service.getQName() + " does not contain any usable ports");
        }
        Iterator portIte = service.getPorts().values().iterator();
        while (portIte.hasNext()) {
            Port port = (Port)portIte.next();
            Binding binding = port.getBinding();
            bindings.put(binding.getQName(), getXNode(service, port));
            if (WSDLConstants.WSDL11_NAMESPACE.equals(binding.getQName().getNamespaceURI())) {
                throw new ToolException("Binding "
                                        + binding.getQName().getLocalPart()
                                        + " namespace set improperly.");
            }
        }

        return bindings;
View Full Code Here

        for (Service service : services.values()) {
            vBindingNodes.putAll(getBindings(service));
        }

        for (QName bName : vBindingNodes.keySet()) {
            Binding binding = this.definition.getBinding(bName);
            XNode vBindingNode = getXNode(binding);
            vBindingNode.setFailurePoint(vBindingNodes.get(bName));
            vNodes.add(vBindingNode);

            if (binding.getPortType() == null) {
                continue;
            }
            portTypeRefNames.add(binding.getPortType().getQName());

            XNode vPortTypeNode = getXNode(binding.getPortType());
            vPortTypeNode.setFailurePoint(vBindingNode);
            vNodes.add(vPortTypeNode);
            for (Iterator iter = binding.getBindingOperations().iterator(); iter.hasNext();) {
                BindingOperation bop = (BindingOperation) iter.next();
                XNode vOpNode = getOperationXNode(vPortTypeNode, bop.getName());
                XNode vBopNode = getOperationXNode(vBindingNode, bop.getName());
                vOpNode.setFailurePoint(vBopNode);
                vNodes.add(vOpNode);
View Full Code Here

            EndpointReferenceType reference = EndpointReferenceUtils.getEndpointReference(url,
                    wsBinding.getWSDLService().getQName(),
                    wsBinding.getWSDLPort().getName());

            String bindingId = null;
            Binding binding = wsBinding.getWSDLPort().getBinding();
            if (null != binding) {
                List list = binding.getExtensibilityElements();
                if (!list.isEmpty()) {
                    bindingId = ((ExtensibilityElement)list.get(0)).getElementType().getNamespaceURI();
                }
            }
            if (bindingId == null) {
View Full Code Here

        }       
    }


    private PortType getPortType(Port port) {
       Binding binding = port.getBinding();
       if(null != binding){
          return binding.getPortType();
       }
       return null;
       
    }
View Full Code Here

                wsBinding.getWSDLPort().getName());
       
        AttributedURIType address = new AttributedURIType();

        String bindingId = null;
        Binding binding = wsBinding.getWSDLPort().getBinding();
        if (null != binding) {
            List list = binding.getExtensibilityElements();
            if (!list.isEmpty()) {
                bindingId = ((ExtensibilityElement)list.get(0)).getElementType().getNamespaceURI();
            }
        }
        List<?> list = wsBinding.getWSDLPort().getExtensibilityElements();
View Full Code Here

                Operation operation = (Operation)ite.next();
                if (isOverloading(operation.getName())) {
                    continue;
                }
                BindingOperation bop = wsdlHelper.getBindingOperation(def, operation.getName());
                Binding binding = wsdlHelper.getBinding(bop, def);
                String bindingStyle = binding != null ? SOAPBindingUtil.getBindingStyle(binding) : "";
                String style = StringUtils.isEmpty(SOAPBindingUtil.getSOAPOperationStyle(bop))
                    ? bindingStyle : SOAPBindingUtil.getSOAPOperationStyle(bop);
                if ("DOCUMENT".equalsIgnoreCase(style) || StringUtils.isEmpty(style)) {
                    boolean passed = checkR2201Input(operation, bop)
View Full Code Here

    }

    public boolean checkR2203And2204() {

        for (Iterator ite = def.getBindings().values().iterator(); ite.hasNext();) {
            Binding binding = (Binding)ite.next();

            String style = SOAPBindingUtil.getCanonicalBindingStyle(binding);

            //

            for (Iterator ite2 = binding.getPortType().getOperations().iterator(); ite2.hasNext();) {
                Operation operation = (Operation)ite2.next();
                BindingOperation bop = wsdlHelper.getBindingOperation(def, operation.getName());
                if (operation.getInput() != null && operation.getInput().getMessage() != null) {
                    Message inMess = operation.getInput().getMessage();
View Full Code Here

    // TODO: Should also check SoapHeader/SoapHeaderFault
    @SuppressWarnings("unchecked")
    public boolean checkR2205() {
        for (Iterator ite = def.getBindings().values().iterator(); ite.hasNext();) {
            Binding binding = (Binding)ite.next();

            if (!SOAPBindingUtil.isSOAPBinding(binding)) {
                System.err.println("WSIBP Validator found <"
                                   + binding.getQName() + "> is NOT a SOAP binding");
                continue;
            }

            for (Iterator ite2 = binding.getPortType().getOperations().iterator(); ite2.hasNext();) {
                Operation operation = (Operation)ite2.next();
                Collection<Fault> faults = operation.getFaults().values();
                if (CollectionUtils.isEmpty(faults)) {
                    continue;
                }
View Full Code Here

    public boolean checkR2705() {
        Iterator ite = def.getBindings().values().iterator();
        while (ite.hasNext()) {
            Object obj = ite.next();
            Binding binding = (Binding)obj;
            if (SOAPBindingUtil.isMixedStyle(binding)) {
                addErrorMessage("Mixed style, invalid WSDL");
                return false;
            }
        }
View Full Code Here

TOP

Related Classes of javax.wsdl.Binding

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.