Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPFault


     * @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 (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;
            }
           
            return Use.ENCODED;
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

            bindingOperation.addBindingFault(bf);
        }
    }

    private static void setSoapFaultExtElement(BindingFault bf, ExtensionRegistry extReg) throws Exception {
        SOAPFault soapFault = SOAPBindingUtil.createSoapFault(extReg, false);
        soapFault.setName(bf.getName());
        soapFault.setUse(useLiteral);
        bf.addExtensibilityElement(soapFault);
    }
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

        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

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.