Package javax.xml.soap

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


      if (obj == null)
      {
         try
         {
            SOAPFactory factory = SOAPFactory.newInstance();
            SOAPFault fault = factory.createFault("Request object cannot be null", new QName("http://org.jboss.ws", "Dispatch"));
            fault.setFaultActor("client");
            throw new SOAPFaultException(fault);
         }
         catch (SOAPException e)
         {
View Full Code Here


   {
      // This should be thrown as-is
      try
      {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPFault fault = factory.createFault("this is a fault string!", new QName("http://foo", "FooCode"));
         fault.setFaultActor("mr.actor");
         fault.addDetail().addChildElement("test");
         throw new SOAPFaultException(fault);
      }
      catch (SOAPException s)
View Full Code Here

                if (usesSOAP12) {
                    faultCodeQName = SENDER_QNAME;
                } else {
                    faultCodeQName = CLIENT_QNAME;
                }
                soapFault = soapFactory.createFault("SOAPMessage request format error - missing body element", faultCodeQName);
            } catch (SOAPException se) {
                /* safe to ignore */
            }
            throw new SOAPFaultException(soapFault);
        }
View Full Code Here

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

                    if (usesSOAP12) {
                        faultCodeQName = RECEIVER_QNAME;
                    } else {
                        faultCodeQName = SERVER_QNAME;
                    }
                    soapFault = soapFactory.createFault("SOAPMessage response error - " + e.getMessage(), faultCodeQName);
                } catch (SOAPException soape2) {
                    // ignore
                }
                throw new SOAPFaultException(soapFault);
            }
View Full Code Here

      if (obj == null)
      {
         try
         {
            SOAPFactory factory = SOAPFactory.newInstance();
            SOAPFault fault = factory.createFault("Request object cannot be null", new QName("http://org.jboss.ws", "Dispatch"));
            fault.setFaultActor("client");
            throw new SOAPFaultException(fault);
         }
         catch (SOAPException e)
         {
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

                }
                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

                }
                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

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.