Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPFault


        if (attr == null) {
            return Use.ENCODED;    // should really create an exception for this.
        } else {
            HashMap m = attr.getFaultBodyTypeMap();
            SOAPFault soapFault = (SOAPFault) m.get(faultName);

            // This should never happen (error thrown in SymbolTable)
            if (soapFault == null) {
                return Use.ENCODED;
            }

            String use = soapFault.getUse();

            if ("literal".equals(use)) {
                return Use.LITERAL;
            }
View Full Code Here


            // Add the fault to the binding
            BindingFault bFault = def.createBindingFault();

            bFault.setName(faultDesc.getName());

            SOAPFault soapFault = writeSOAPFault(faultDesc);

            bFault.addExtensibilityElement(soapFault);
            bindingOper.addBindingFault(bFault);

            // Add the fault message
View Full Code Here

     * @param faultDesc
     * @return
     */
    protected SOAPFault writeSOAPFault(FaultDesc faultDesc) {

        SOAPFault soapFault = new com.ibm.wsdl.extensions.soap.SOAPFaultImpl();

        soapFault.setName(faultDesc.getName());

        if (use != Use.ENCODED) {
            soapFault.setUse("literal");

            // no namespace for literal, gets it from the element
        } else {
            soapFault.setUse("encoded");
            soapFault.setEncodingStyles(encodingList);

            // Set the namespace from the fault QName if it exists
            // otherwise use the target (or interface) namespace
            QName faultQName = faultDesc.getQName();

            if ((faultQName != null)
                    && !faultQName.getNamespaceURI().equals("")) {
                soapFault.setNamespaceURI(faultQName.getNamespaceURI());
            } else {
                if (targetService == null) {
                    soapFault.setNamespaceURI(intfNS);
                } else {
                    soapFault.setNamespaceURI(targetService);
                }
            }
        }

        return soapFault;
View Full Code Here

            oper.addFault(fault);

            // Add the fault to the binding
            BindingFault bFault = def.createBindingFault();
            bFault.setName(faultDesc.getName());
            SOAPFault soapFault = writeSOAPFault(faultDesc);
            bFault.addExtensibilityElement(soapFault);
            bindingOper.addBindingFault(bFault);
           
            // Add the fault message
            if (def.getMessage(msg.getQName()) == null) {
View Full Code Here

        }
        return soapBody;
    } // writeSOAPBody

    private SOAPFault writeSOAPFault(FaultDesc faultDesc) {
        SOAPFault soapFault = new com.ibm.wsdl.extensions.soap.SOAPFaultImpl();
        if (use != Use.ENCODED) {
            soapFault.setUse("literal");
            // no namespace for literal, gets it from the element
        } else {
            soapFault.setUse("encoded");
            soapFault.setEncodingStyles(encodingList);
           
            // Set the namespace from the fault QName if it exists
            // otherwise use the target (or interface) namespace
            QName faultQName = faultDesc.getQName();
            if (faultQName != null &&
                    !faultQName.getNamespaceURI().equals("")) {
                soapFault.setNamespaceURI(faultQName.getNamespaceURI());
            } else {
                if (targetService == null) {
                    soapFault.setNamespaceURI(intfNS);
                } else {
                    soapFault.setNamespaceURI(targetService);
                }
            }
        }
        return soapFault;
    } // writeSOAPFault
View Full Code Here

            if (!(obj instanceof BindingFault)) {
                continue;
            }
            BindingFault faultElement = (BindingFault) obj;
            for (Object flt : faultElement.getExtensibilityElements()) {
                SOAPFault fault = getSoapFault(flt);
                if (fault != null) {
                    faults.add(fault);
                }
            }
        }
View Full Code Here

            // Add the fault to the binding
            BindingFault bFault = def.createBindingFault();

            bFault.setName(faultDesc.getName());

            SOAPFault soapFault = writeSOAPFault(faultDesc);

            bFault.addExtensibilityElement(soapFault);
            bindingOper.addBindingFault(bFault);

            // Add the fault message
View Full Code Here

     * @param faultDesc
     * @return
     */
    protected SOAPFault writeSOAPFault(FaultDesc faultDesc) {

        SOAPFault soapFault = new com.ibm.wsdl.extensions.soap.SOAPFaultImpl();

        soapFault.setName(faultDesc.getName());

        if (use != Use.ENCODED) {
            soapFault.setUse("literal");

            // no namespace for literal, gets it from the element
        } else {
            soapFault.setUse("encoded");
            soapFault.setEncodingStyles(encodingList);

            // Set the namespace from the fault QName if it exists
            // otherwise use the target (or interface) namespace
            QName faultQName = faultDesc.getQName();

            if ((faultQName != null)
                    && !faultQName.getNamespaceURI().equals("")) {
                soapFault.setNamespaceURI(faultQName.getNamespaceURI());
            } else {
                if (targetService == null) {
                    soapFault.setNamespaceURI(intfNS);
                } else {
                    soapFault.setNamespaceURI(targetService);
                }
            }
        }

        return soapFault;
View Full Code Here

                faultName = faultName.substring(faultName.lastIndexOf(".") + 1);
                bindingFault = definition.createBindingFault();
                bindingFault.setName("fault" + faultName);
                bindingOperation.addBindingFault(bindingFault);

                SOAPFault soapFault = (SOAPFault) extensionRegistry.createExtension(
                        BindingFault.class, new QName("http://schemas.xmlsoap.org/wsdl/soap/", "fault"));
                soapFault.setUse("literal");
                soapFault.setName("fault" + faultName);
                bindingFault.addExtensibilityElement(soapFault);
            }


        } catch (WSDLException e) {
View Full Code Here

            // Add the fault to the binding
            BindingFault bFault = def.createBindingFault();

            bFault.setName(faultDesc.getName());

            SOAPFault soapFault = writeSOAPFault(faultDesc);

            bFault.addExtensibilityElement(soapFault);
            bindingOper.addBindingFault(bFault);

            // Add the fault message
View Full Code Here

TOP

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

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.