Package javax.xml.soap

Examples of javax.xml.soap.SOAPFactory.createFault()


                }
                Throwable e1 = e;
                if (e.getCause() != null) {
                    e1 = e.getCause();
                }
                soapFault = soapFactory.createFault("SOAPMessage request format error - " +
                    e1, clientQName);
            }
            catch (SOAPException se) {
                // ignore
            }
View Full Code Here


                        serverQName = new QName(URI_NS_SOAP_1_2_ENVELOPE, "Server");
                    }
                    else {
                        serverQName = new QName(URI_NS_SOAP_1_1_ENVELOPE, "Server");
                    }
                    soapFault = soapFactory.createFault("SOAPMessage response error - " +
                        e.getMessage(), serverQName);
                }
                catch (SOAPException soape2) {
                    // ignore
                }
View Full Code Here

            if (v.contains("Return sayHi")) {
                response = sayHiResponse;
            } else if (v.contains("throwFault")) {
                try {
                    SOAPFactory f = SOAPFactory.newInstance();
                    SOAPFault soapFault = f.createFault();
                   
                    soapFault.setFaultString("Test Fault String ****");
      
                    Detail detail = soapFault.addDetail();
                    detail = soapFault.getDetail();
View Full Code Here

            Element el = DOMUtils.getFirstElement(n);
            String s = DOMUtils.getContent(el);
            if (s.trim().equals("throwFault")) {
                try {
                    SOAPFactory f = SOAPFactory.newInstance();
                    SOAPFault soapFault = f.createFault();
                   
                    soapFault.setFaultString("Test Fault String ****");
      
                    Detail detail = soapFault.addDetail();
                    detail = soapFault.getDetail();
View Full Code Here

            if (v.contains("Return sayHi")) {
                response = sayHiResponse;
            } else if (v.contains("throwFault")) {
                try {
                    SOAPFactory f = SOAPFactory.newInstance();
                    SOAPFault soapFault = f.createFault();
                   
                    soapFault.setFaultString("Test Fault String ****");
      
                    Detail detail = soapFault.addDetail();
                    detail = soapFault.getDetail();
View Full Code Here

                }
                else {
                    clientQName = new QName(URI_NS_SOAP_1_1_ENVELOPE, "Client");
                }
                soapFault =
                    soapFactory.createFault("SOAPMessage request format error - missing body element",
                        clientQName);
            }
            catch (SOAPException se) {
                /* safe to ignore */
            }
View Full Code Here

                    clientQName = new QName(URI_NS_SOAP_1_2_ENVELOPE, "Client");
                }
                else {
                    clientQName = new QName(URI_NS_SOAP_1_1_ENVELOPE, "Client");
                }
                soapFault = soapFactory.createFault("SOAPMessage request format error - " +
                    e.getMessage(), clientQName);
            }
            catch (SOAPException se) {
                // ignore
            }
View Full Code Here

                        serverQName = new QName(URI_NS_SOAP_1_2_ENVELOPE, "Server");
                    }
                    else {
                        serverQName = new QName(URI_NS_SOAP_1_1_ENVELOPE, "Server");
                    }
                    soapFault = soapFactory.createFault("SOAPMessage response error - " +
                        e.getMessage(), serverQName);
                }
                catch (SOAPException se) {
                    // ignore
                }
View Full Code Here

        }
        String protocolIdentifier = register.getProtocolIdentifier();
        if (TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER.equals(protocolIdentifier)) {
            try {
                SOAPFactory factory = SOAPFactory.newInstance();
                SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME);
                soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_ALREADY_REGISTERED_QNAME).addTextNode("already registered");
                throw new SOAPFaultException(soapFault);
            } catch (Throwable th) {
                throw new ProtocolException(th);
            }
View Full Code Here

            }
        }
        if (TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER.equals(protocolIdentifier)) {
            try {
                SOAPFactory factory = SOAPFactory.newInstance();
                SOAPFault soapFault = factory.createFault(SoapFaultType.FAULT_SENDER.getValue(), CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME);
                soapFault.addDetail().addDetailEntry(CoordinationConstants.WSCOOR_ERROR_CODE_INVALID_PROTOCOL_QNAME).addTextNode("invalid protocol");
                throw new SOAPFaultException(soapFault);
            } catch (Throwable th) {
                throw new ProtocolException(th);
            }
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.