Package javax.wsdl

Examples of javax.wsdl.Binding


        Service service = definition.getService(new QName(namespace, name));
        assertNotNull(service);
        assertEquals(namespace, service.getQName().getNamespaceURI());
        // The service name should be equal to th
        assertEquals(name, service.getQName().getLocalPart());
        Binding binding = definition.getBinding(new QName(namespace, "EchoServiceHttpBinding"));
        assertNotNull(binding);
        SOAPBinding soapBinding = (SOAPBinding) binding.getExtensibilityElements().get(0);
        assertNotNull(soapBinding);
        assertEquals(SoapConstants.STYLE_DOCUMENT, soapBinding.getStyle());
    }
View Full Code Here


    }

    public boolean isValid() {
        Iterator itBinding = def.getBindings().keySet().iterator();
        while (itBinding.hasNext()) {
            Binding binding = (Binding)def.getBindings().get(itBinding.next());
            Iterator itOperation = binding.getBindingOperations().iterator();
            while (itOperation.hasNext()) {
                BindingOperation bindingOperation = (BindingOperation)itOperation.next();
                Iterator itInputExt = bindingOperation.getBindingInput().getExtensibilityElements()
                    .iterator();
                while (itInputExt.hasNext()) {
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 ? wsdlHelper.getBindingStyle(binding) : "";

                String style = "".equals(wsdlHelper.getSOAPOperationStyle(bop))
                    ? bindingStyle : wsdlHelper.getSOAPOperationStyle(bop);
View Full Code Here

    }

    public boolean checkR2203And2204() {

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

            String style = wsdlHelper.getCanonicalBindingStyle(binding);

            //

            for (Iterator ite2 = binding.getPortType().getOperations().iterator(); ite2.hasNext();) {
                Operation operation = (Operation)ite2.next();
                if (operation.getInput() != null && operation.getInput().getMessage() != null) {
                    Message inMess = operation.getInput().getMessage();

                    for (Iterator ite3 = inMess.getParts().values().iterator(); ite3.hasNext();) {
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 (wsdlHelper.isMixedStyle(binding)) {
                addErrorMessage("Mixted style ,Wrong WSDL");
                return false;
            }
        }
View Full Code Here

        for (int i = 0; i < nodelist.getLength(); i++) {
            Node node = nodelist.item(i);
            Node n = node.getAttributes().getNamedItem(WSDLConstants.ATTR_NAME);
            QName bindingName = new QName(def.getTargetNamespace(), n.getNodeValue());

            Binding binding = def.getBinding(bindingName);

            QName typeName = binding.getPortType().getQName();

            if (!portTypes.containsKey(typeName)) {
                Node errorNode = ErrNodeLocator.getNode(document, WSDLConstants.QNAME_DEFINITIONS, null,
                                                        bindingName.getLocalPart());
                schemaWSDLValidator.addError(errorNode, typeName + " is not defined");
                isValid = false;
            } else {

                Map<QName, Operation> operationMap = portTypes.get(typeName);

                // OperationList
                List<QName> operationList = new ArrayList<QName>();
                operationList.addAll(operationMap.keySet());

                // bindingOperationList
                Iterator ite = binding.getBindingOperations().iterator();
                while (ite.hasNext()) {
                    BindingOperation bop = (BindingOperation)ite.next();
                    QName bopName = new QName(def.getTargetNamespace(), bop.getName());

                    if (!operationList.contains(bopName)) {
View Full Code Here

        while (ite.hasNext()) {
            Service service = (Service)ite.next();
            Iterator portIte = service.getPorts().values().iterator();
            while (portIte.hasNext()) {
                Port port = (Port)portIte.next();
                Binding binding = port.getBinding();
                if (!bindingMap.containsKey(binding.getQName())) {
                    Node errNode = ErrNodeLocator.getNode(document, WSDLConstants.QNAME_SERVICE, service
                        .getQName().getLocalPart(), port.getName());
                    schemaWSDLValidator.addError(errNode, " port : " + port.getName()
                                                          + " reference binding is not defined");
                    isValid = false;
View Full Code Here

        //TODO:
        return false;
    }

    private Object getBinding() {
        Binding binding = port.getBinding();
        if (null == binding) {
            // TODO
            return null;
        }
       
        List list = binding.getExtensibilityElements();    
        if (list.isEmpty()) {
            // TODO
            // throw new WebServiceException("Could not get the extension element URI");
            return null;
        }
View Full Code Here

            it.hasNext();) {
            Definition definition = it.next();
            String defName = "Definition: " + definition.getQName().toString();
            for (Iterator jt = definition.getBindings().values().iterator();
                jt.hasNext();) {
                Binding binding = (Binding)jt.next();
                String name = defName + " Binding: " + binding.getQName().toString();
                strList.add(name);
            }               
        }
        String[] strings = new String[strList.size()];
        return strList.toArray(strings);
View Full Code Here

        if (operationName == null) {
            return null;
        }
        Iterator ite = def.getBindings().values().iterator();
        while (ite.hasNext()) {
            Binding binding = (Binding)ite.next();
            Iterator ite1 = binding.getBindingOperations().iterator();
            while (ite1.hasNext()) {
                BindingOperation bop = (BindingOperation)ite1.next();
                if (bop.getName().equals(operationName)) {
                    return bop;
                }
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.