Examples of appendFaultSubcode()


Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

            }
            soapFault.setFaultString(((SoapFault)ex).getReason());
            soapFault.setFaultCode(((SoapFault)ex).getFaultCode());
            soapFault.setFaultActor(((SoapFault)ex).getRole());
            if (((SoapFault)ex).getSubCode() != null) {
                soapFault.appendFaultSubcode(((SoapFault)ex).getSubCode());
            }

            if (((SoapFault)ex).hasDetails()) {
                Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(),
                                                                  true);
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

            }
            soapFault.setFaultString(((SoapFault)ex).getReason());
            soapFault.setFaultCode(((SoapFault)ex).getFaultCode());
            soapFault.setFaultActor(((SoapFault)ex).getRole());
            if (((SoapFault)ex).getSubCode() != null) {
                soapFault.appendFaultSubcode(((SoapFault)ex).getSubCode());
            }

            if (((SoapFault)ex).hasDetails()) {
                Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(),
                                                                  true);
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

        try {
            SOAPFault fault = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createFault(input,
                    SOAPConstants.SOAP_VERSIONMISMATCH_FAULT);
            fault.setFaultActor("mr.actor");
            fault.addDetail().addChildElement("test");
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "NullPointerException"));
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "OperatorNotFound"));
            throw new SOAPFaultException(fault);
        } catch (SOAPException ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

            SOAPFault fault = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createFault(input,
                    SOAPConstants.SOAP_VERSIONMISMATCH_FAULT);
            fault.setFaultActor("mr.actor");
            fault.addDetail().addChildElement("test");
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "NullPointerException"));
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "OperatorNotFound"));
            throw new SOAPFaultException(fault);
        } catch (SOAPException ex) {
            ex.printStackTrace();
        }
        return "Failure!";
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

        try {
            SOAPFault fault = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createFault(input,
                    SOAPConstants.SOAP_VERSIONMISMATCH_FAULT);
            fault.setFaultActor("mr.actor");
            fault.addDetail().addChildElement("test");
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "NullPointerException"));
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "OperatorNotFound"));
            throw new SOAPFaultException(fault);
        } catch (SOAPException ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

            SOAPFault fault = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createFault(input,
                    SOAPConstants.SOAP_VERSIONMISMATCH_FAULT);
            fault.setFaultActor("mr.actor");
            fault.addDetail().addChildElement("test");
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "NullPointerException"));
            fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "OperatorNotFound"));
            throw new SOAPFaultException(fault);
        } catch (SOAPException ex) {
            ex.printStackTrace();
        }
        return "Failure!";
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

                soapFault.setFaultActor(role);
            }
            if (((SoapFault)ex).getSubCodes() != null && !isSoap11) {
                // set the subcode only if it is supported (e.g, 1.2)
                for (QName fsc : ((SoapFault)ex).getSubCodes()) {
                    soapFault.appendFaultSubcode(fsc);   
                }
            }

            if (((SoapFault)ex).hasDetails()) {
                Node nd = soapFault.getOwnerDocument().importNode(((SoapFault)ex).getDetail(),
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

        SOAPEnvelope envelope = soapPart.getEnvelope();
        envelope.addNamespaceDeclaration("cwmp", "http://cwmp.com");
        SOAPBody body = envelope.getBody();
        SOAPFault soapFault = body.addFault();
        QName qname = new QName("http://example.com", "myfault1", "flt1");
        soapFault.appendFaultSubcode(qname);

        QName qname2 = new QName("http://example2.com", "myfault2", "flt2");
        soapFault.appendFaultSubcode(qname2);

        QName qname3 = new QName("http://example3.com", "myfault3", "flt3");
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

        SOAPFault soapFault = body.addFault();
        QName qname = new QName("http://example.com", "myfault1", "flt1");
        soapFault.appendFaultSubcode(qname);

        QName qname2 = new QName("http://example2.com", "myfault2", "flt2");
        soapFault.appendFaultSubcode(qname2);

        QName qname3 = new QName("http://example3.com", "myfault3", "flt3");
        soapFault.appendFaultSubcode(qname3);

        soapMessage.saveChanges();
View Full Code Here

Examples of javax.xml.soap.SOAPFault.appendFaultSubcode()

        QName qname2 = new QName("http://example2.com", "myfault2", "flt2");
        soapFault.appendFaultSubcode(qname2);

        QName qname3 = new QName("http://example3.com", "myfault3", "flt3");
        soapFault.appendFaultSubcode(qname3);

        soapMessage.saveChanges();

        Iterator faultSubCodes = soapFault.getFaultSubcodes();
        assertNotNull(faultSubCodes);
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.