Examples of BindingFault


Examples of com.sun.tools.internal.ws.wsdl.document.BindingFault

                }
                context.pop();
            } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_FAULT)) {
                context.push();
                context.registerNamespaces(e2);
                BindingFault fault = new BindingFault(forest.locatorTable.getStartLocation(e2));
                String nameAttr =
                    Util.getRequiredAttribute(e2, Constants.ATTR_NAME);
                fault.setName(nameAttr);
                operation.addFault(fault);
                gotFault = true;

                // verify that there is at most one child element and it is a documentation element
                boolean gotDocumentation2 = false;
                for (Iterator iter2 = XmlUtil.getAllChildren(e2);
                     iter2.hasNext();
                    ) {
                    Element e3 = Util.nextElement(iter2);
                    if (e3 == null)
                        break;

                    if (XmlUtil
                        .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
                        if (gotDocumentation2) {
                            errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
                        }
                        gotDocumentation2 = true;
                        if(fault.getDocumentation() == null)
                            fault.setDocumentation(getDocumentationFor(e3));
                    } else {
                        // possible extensibility element -- must live outside the WSDL namespace
                        checkNotWsdlElement(e3);
                        if (!handleExtension(context, fault, e3)) {
                            checkNotWsdlRequired(e3);
View Full Code Here

Examples of com.sun.tools.ws.wsdl.document.BindingFault

                }
                context.pop();
            } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_FAULT)) {
                context.push();
                context.registerNamespaces(e2);
                BindingFault fault = new BindingFault(forest.locatorTable.getStartLocation(e2));
                String nameAttr =
                    Util.getRequiredAttribute(e2, Constants.ATTR_NAME);
                fault.setName(nameAttr);
                operation.addFault(fault);
                gotFault = true;

                // verify that there is at most one child element and it is a documentation element
                boolean gotDocumentation2 = false;
                for (Iterator iter2 = XmlUtil.getAllChildren(e2);
                     iter2.hasNext();
                    ) {
                    Element e3 = Util.nextElement(iter2);
                    if (e3 == null)
                        break;

                    if (XmlUtil
                        .matchesTagNS(e3, WSDLConstants.QNAME_DOCUMENTATION)) {
                        if (gotDocumentation2) {
                            errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
                        }
                        gotDocumentation2 = true;
                        if(fault.getDocumentation() == null)
                            fault.setDocumentation(getDocumentationFor(e3));
                    } else {
                        // possible extensibility element -- must live outside the WSDL namespace
                        checkNotWsdlElement(e3);
                        if (!handleExtension(context, fault, e3)) {
                            checkNotWsdlRequired(e3);
View Full Code Here

Examples of javax.wsdl.BindingFault

        generateOutputSoapBody(jmethod, operation, jmethod.getResponse());

        for (org.objectweb.celtix.tools.common.model.WSDLException ex : jmethod.getWSDLExceptions()) {

            BindingFault bindingFault = definition.createBindingFault();
            bindingFault.setName(ex.getExcpetionClass().getSimpleName());
            operation.addBindingFault(bindingFault);
            javax.wsdl.extensions.soap.SOAPFault soapFault = null;
            try {
                soapFault = (javax.wsdl.extensions.soap.SOAPFault)extensionRegistry
                    .createExtension(BindingFault.class, new QName(WSDLConstants.SOAP11_NAMESPACE, "fault"));
                soapFault.setUse("literal");
                soapFault.setName(ex.getExcpetionClass().getSimpleName());
            } catch (WSDLException e) {
                throw new ToolException(e.getMessage(), e);
            }
            bindingFault.addExtensibilityElement(soapFault);

        }

    }
View Full Code Here

Examples of javax.wsdl.BindingFault

                }
            }
            if (!found) {
                fail("Element soap:operation Missed!");
            }
            BindingFault fault = bo.getBindingFault("pingMeFault");
            if (fault == null) {
                fail("Element <wsdl:fault name=\"pingMeFault\"> Missed!");
            }
            it = fault.getExtensibilityElements().iterator();
            found = false;
            while (it.hasNext()) {
                Object obj = it.next();
                if (obj instanceof SOAPFault) {
                    found = true;
View Full Code Here

Examples of javax.wsdl.BindingFault

        Map faults = op.getFaults();
        Iterator it = faults.keySet().iterator();
        while (it.hasNext()) {
            String key = (String)it.next();
            Fault fault = (Fault)faults.get(key);
            BindingFault bf = wsdlDefinition.createBindingFault();
            bf.setName(fault.getName());
            setSoapFaultExtElement(bf);
            bindingOperation.addBindingFault(bf);
        }
    }
View Full Code Here

Examples of javax.wsdl.BindingFault

            if (op.getFaults() != null && op.getFaults().size() > 0) {
                Map faults = op.getFaults();
                Iterator i = faults.values().iterator();              
                while (i.hasNext()) {
                    Fault fault = (Fault)i.next();
                    BindingFault bindingFault = definition.createBindingFault();
                    bindingFault.setName(fault.getName());                   
                    bindingOperation.addBindingFault(bindingFault);
                }              
            }
            bindingOperation.setOperation(op);
            binding.addBindingOperation(bindingOperation);
View Full Code Here

Examples of javax.wsdl.BindingFault

        raisesType.setException(new QName(typeMap.getTargetNamespace(),
                                          exceptionName));
        corbaOperation.getRaises().add(raisesType);

        // binding - operation - fault
        BindingFault bindingFault = definition.createBindingFault();
        bindingFault.setName(faultMsg.getQName().getLocalPart());
        bindingOperation.addBindingFault(bindingFault);

        definition.addMessage(faultMsg);
    }
View Full Code Here

Examples of javax.wsdl.BindingFault

            /* process the binding faults */
            for (Iterator bindingFaults = bindingFaultsMap.values().iterator();
                 bindingFaults.hasNext();) {

                BindingFault bindingFault = (BindingFault) bindingFaults.next();
                if (bindingFault.getName() == null) {
                    throw new AxisFault("Binding name is null for the binding fault in " +
                            " binding operation ==> " + wsdl4jBindingOperation.getName());
                } else {
                    Fault wsdl4jFault = wsdl4jOperation.getFault(bindingFault.getName());
                    if (wsdl4jFault == null){
                        throw new AxisFault("Can not find the corresponding fault element in " +
                                "wsdl operation " + wsdl4jOperation.getName() + " for the fault" +
                                " name " + bindingFault.getName());
                    } else {
                        Message wsdl4jFaultMessge = wsdl4jFault.getMessage();

                        AxisMessage faultMessage = findFaultMessage(
                                wsdl4jFault.getName(),
View Full Code Here

Examples of javax.wsdl.BindingFault

                createBindingOutput(definition, operation, bindingOperation);
                createBindingInput(definition, operation, bindingOperation);
            }
            for (Iterator<?> faultIterator = operation.getFaults().values().iterator(); faultIterator.hasNext();) {
                Fault fault = (Fault) faultIterator.next();
                BindingFault bindingFault = definition.createBindingFault();
                populateBindingFault(definition, bindingFault, fault);
                if (StringUtils.hasText(bindingFault.getName())) {
                    bindingOperation.addBindingFault(bindingFault);
                }
            }
            binding.addBindingOperation(bindingOperation);
        }
View Full Code Here

Examples of javax.wsdl.BindingFault

        }
    }

    protected void buildBindingFault(Definition def, BindingOperation bindingOperation,
                                   Collection<BindingFaultInfo> bindingFaultInfos) {
        BindingFault bindingFault = null;
        for (BindingFaultInfo bindingFaultInfo
            : bindingFaultInfos) {
            bindingFault = def.createBindingFault();
            addDocumentation(bindingFault, bindingFaultInfo.getDocumentation());
            bindingFault.setName(bindingFaultInfo.getFaultInfo().getFaultName().getLocalPart());
            bindingOperation.addBindingFault(bindingFault);
            addExtensibilityAttributes(bindingFault, bindingFaultInfo.getExtensionAttributes());
            addExtensibilityElements(bindingFault, getWSDL11Extensors(bindingFaultInfo));
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.