Package javax.xml.soap

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


        boolean found2 = false;

        //Appending fault Subcode
        sf.appendFaultSubcode(expected1);
        //Appending a second fault Subcode
        sf.appendFaultSubcode(expected2);

        //Getting FaultSubCodes from SOAPFault
        Iterator i = sf.getFaultSubcodes();
        int j = 0;
        while (i.hasNext()) {
View Full Code Here


            SOAPFault fault;
            if (soapVer == SOAPVersion.SOAP_12) {
                factory = SOAPVersion.SOAP_12.getSOAPFactory();
                fault = factory.createFault();
                fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(subcode);
                fault.appendFaultSubcode(subsubcode);
                getInvalidMapDetail(name, fault.addDetail());
            } else {
                factory = SOAPVersion.SOAP_11.getSOAPFactory();
                fault = factory.createFault();
View Full Code Here

            if (soapVer == SOAPVersion.SOAP_12) {
                factory = SOAPVersion.SOAP_12.getSOAPFactory();
                fault = factory.createFault();
                fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(subcode);
                fault.appendFaultSubcode(subsubcode);
                getInvalidMapDetail(name, fault.addDetail());
            } else {
                factory = SOAPVersion.SOAP_11.getSOAPFactory();
                fault = factory.createFault();
                fault.setFaultCode(subsubcode);
View Full Code Here

            SOAPFault fault;
            if (soapVer == SOAPVersion.SOAP_12) {
                factory = SOAPVersion.SOAP_12.getSOAPFactory();
                fault = factory.createFault();
                fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(subcode);
                fault.appendFaultSubcode(subsubcode);
                getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail());
            } else {
                factory = SOAPVersion.SOAP_11.getSOAPFactory();
                fault = factory.createFault();
View Full Code Here

            if (soapVer == SOAPVersion.SOAP_12) {
                factory = SOAPVersion.SOAP_12.getSOAPFactory();
                fault = factory.createFault();
                fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(subcode);
                fault.appendFaultSubcode(subsubcode);
                getMapRequiredDetail(e.getMissingHeaderQName(), fault.addDetail());
            } else {
                factory = SOAPVersion.SOAP_11.getSOAPFactory();
                fault = factory.createFault();
                fault.setFaultCode(subsubcode);
View Full Code Here

            reasonText = (sfe.getMessage() != null) ? sfe.getMessage() : "";
        }
        try {
            if (version == SOAPVersion.SOAP_12) {
                fault = soapFactory.createFault(reasonText, SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(sfe.getFaultCode());
            } else {
                fault = soapFactory.createFault(reasonText, sfe.getFaultCode());
            }
        } catch (Exception e) {
            throw new XWSSecurityRuntimeException(e);
View Full Code Here

           SOAPFault fault;
        try {
            if (version == SOAPVersion.SOAP_12) {
                fault = soapFactory.createFault(faultString, SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(faultCode);
            } else {
                fault = soapFactory.createFault(faultString, faultCode);
            }
        } catch (Exception e) {
            throw new XWSSecurityRuntimeException(e);
View Full Code Here

                case SOAP_11:
                    soapFault.setFaultCode(subcode);
                    break;
                case SOAP_12:
                    soapFault.setFaultCode(code);
                    soapFault.appendFaultSubcode(subcode);

                    if (detailEntries != null && !detailEntries.isEmpty()) {
                        final Detail detail = soapFault.addDetail();
                        for (SoapFaultDetailEntry entry : detailEntries) {
                            detail.addDetailEntry(entry.name).setValue(entry.value);
View Full Code Here

                    Collections.reverse(subcodesList);
                    if (!subcodesList.isEmpty()) {
                        for (String subCodeValue : subcodesList) {
                            subCodeValue = subCodeValue.substring(subCodeValue.indexOf(":") + 1);
                            QName subcodeqname = new QName(MessageConstants.SOAP_1_2_NS, subCodeValue);
                            fault.appendFaultSubcode(subcodeqname);
                        }
                    }
                    throw new javax.xml.ws.soap.SOAPFaultException(fault);

                }
View Full Code Here

    protected RuntimeException generateInternalError(PolicyException ex){
        SOAPFault fault = null;
        try {
            if (isSOAP12) {
                fault = soapFactory.createFault(ex.getMessage(),SOAPConstants.SOAP_SENDER_FAULT);
                fault.appendFaultSubcode(MessageConstants.WSSE_INTERNAL_SERVER_ERROR);
            } else {
                fault = soapFactory.createFault(ex.getMessage(), MessageConstants.WSSE_INTERNAL_SERVER_ERROR);
            }
        } catch (Exception e) {
            log.log(Level.SEVERE, LogStringsMessages.WSITPVD_0002_INTERNAL_SERVER_ERROR(), e);
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.