/** * Set the fault code (as a String). * * @param code a new fault code * @deprecated expect to see this go away after 1.1, use * setFaultCodeAsString instead! */ public void setFaultCode(String code) { setFaultCodeAsString(code); }
/** * Set the fault code (as a String). * * @param code a new fault code * @deprecated expect to see this go away after 1.1, use * setFaultCodeAsString instead! */ public void setFaultCode(String code) { setFaultCodeAsString(code); }
/** * Set the fault code (as a String). * * @param code a new fault code * @deprecated expect to see this go away after 1.1, use * setFaultCodeAsString instead! */ public void setFaultCode(String code) { setFaultCodeAsString(code); }
/** * Sets this <CODE>SOAPFaultException</CODE> object with the given * fault code. * * <P>Fault codes, which given information about the fault, * are defined in the SOAP 1.1 specification.</P> * @param faultCode a <CODE>String</CODE> giving * the fault code to be set; must be one of the fault codes * defined in the SOAP 1.1 specification * @throws SOAPException if there was an error in * adding the <CODE>faultCode</CODE> to the underlying XML * tree. */ public void setFaultCode(String faultCode) throws SOAPException { fault.setFaultCodeAsString(faultCode); }
/** * Sets this <CODE>SOAPFaultException</CODE> object with the given * fault code. * * <P>Fault codes, which given information about the fault, * are defined in the SOAP 1.1 specification.</P> * @param faultCode a <CODE>String</CODE> giving * the fault code to be set; must be one of the fault codes * defined in the SOAP 1.1 specification * @throws SOAPException if there was an error in * adding the <CODE>faultCode</CODE> to the underlying XML * tree. */ public void setFaultCode(String faultCode) throws SOAPException { fault.setFaultCodeAsString(faultCode); }
/** * Sets this <CODE>SOAPFaultException</CODE> object with the given * fault code. * * <P>Fault codes, which given information about the fault, * are defined in the SOAP 1.1 specification.</P> * @param faultCode a <CODE>String</CODE> giving * the fault code to be set; must be one of the fault codes * defined in the SOAP 1.1 specification * @throws SOAPException if there was an error in * adding the <CODE>faultCode</CODE> to the underlying XML * tree. */ public void setFaultCode(String faultCode) throws SOAPException { fault.setFaultCodeAsString(faultCode); }
/** * No-arg constructor for building one from an XML stream. */ public AxisFault() { super(); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); initFromException(this); }
/** * No-arg constructor for building one from an XML stream. */ public AxisFault() { super(); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); initFromException(this); }
/** * No-arg constructor for building one from an XML stream. */ public AxisFault() { super(); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); initFromException(this); }
/** * create a simple axis fault from the message. Classname and stack trace * go into the fault details. * @param message */ public AxisFault(String message) { super (message); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); setFaultString(message); initFromException(this); }
/** * create a simple axis fault from the message. Classname and stack trace * go into the fault details. * @param message */ public AxisFault(String message) { super (message); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); setFaultString(message); initFromException(this); }
/** * create a simple axis fault from the message. Classname and stack trace * go into the fault details. * @param message */ public AxisFault(String message) { super (message); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); setFaultString(message); initFromException(this); }
/** * create a fault from any throwable; * When faulting a throwable (as opposed to an exception), * stack trace information does not go into the fault. * @param message any extra text to with the fault * @param t whatever is to be turned into a fault */ public AxisFault (String message, Throwable t) { super (message, t); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); setFaultString(getMessage()); addHostnameIfNeeded(); }
/** * create a fault from any throwable; * When faulting a throwable (as opposed to an exception), * stack trace information does not go into the fault. * @param message any extra text to with the fault * @param t whatever is to be turned into a fault */ public AxisFault (String message, Throwable t) { super (message, t); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); setFaultString(getMessage()); addHostnameIfNeeded(); }
/** * create a fault from any throwable; * When faulting a throwable (as opposed to an exception), * stack trace information does not go into the fault. * @param message any extra text to with the fault * @param t whatever is to be turned into a fault */ public AxisFault (String message, Throwable t) { super (message, t); setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); setFaultString(getMessage()); addHostnameIfNeeded(); }
/** * Wrap an AxisFault around an existing Exception. This is private * to force everyone to use makeFault() above, which sanity-checks us. * * @param target the target <code>Exception</code> */ protected AxisFault(Exception target) { super ("", target); // ? SOAP 1.2 or 1.1 ? setFaultCodeAsString( Constants.FAULT_SERVER_USER ); initFromException(target); // if the target is a JAX-RPC SOAPFaultException init // AxisFault with the values from the SOAPFaultException if ( target instanceof SOAPFaultException ) { //strip out the hostname as we want any new one removeHostname(); initFromSOAPFaultException((SOAPFaultException) target); //but if they left it out, add it addHostnameIfNeeded(); } }
/** * Wrap an AxisFault around an existing Exception. This is private * to force everyone to use makeFault() above, which sanity-checks us. * * @param target the target <code>Exception</code> */ protected AxisFault(Exception target) { super ("", target); // ? SOAP 1.2 or 1.1 ? setFaultCodeAsString( Constants.FAULT_SERVER_USER ); initFromException(target); // if the target is a JAX-RPC SOAPFaultException init // AxisFault with the values from the SOAPFaultException if ( target instanceof SOAPFaultException ) { //strip out the hostname as we want any new one removeHostname(); initFromSOAPFaultException((SOAPFaultException) target); //but if they left it out, add it addHostnameIfNeeded(); } }
/** * Wrap an AxisFault around an existing Exception. This is private * to force everyone to use makeFault() above, which sanity-checks us. * * @param target the target <code>Exception</code> */ protected AxisFault(Exception target) { super ("", target); // ? SOAP 1.2 or 1.1 ? setFaultCodeAsString( Constants.FAULT_SERVER_USER ); initFromException(target); // if the target is a JAX-RPC SOAPFaultException init // AxisFault with the values from the SOAPFaultException if ( target instanceof SOAPFaultException ) { //strip out the hostname as we want any new one removeHostname(); initFromSOAPFaultException((SOAPFaultException) target); //but if they left it out, add it addHostnameIfNeeded(); } }
af.setFaultCodeAsString("Server.UnableToSave"); af.setFaultReason("Unable to save file(s): " + e); throw af;
public void createExceptionResult(final Throwable exception) { messageContext.setPastPivot(true); AxisFault axisFault = null; if (exception instanceof Exception) { axisFault = AxisFault.makeFault((Exception) exception); axisFault.setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL); } else { axisFault = new AxisFault("Server", "Server Error", null, null); } final SOAPFault fault = new SOAPFault(axisFault); final SOAPEnvelope envelope = new SOAPEnvelope(); envelope.addBodyElement(fault); final Message message = new Message(envelope); message.setMessageType(Message.RESPONSE); messageContext.setResponseMessage(message); }