Package org.jibx.ws.soap

Examples of org.jibx.ws.soap.SoapFault


     * @throws SoapFaultException if server fault occurs
     */
    public Welcome welcomeService(Greetee greetee) throws WsException {
        char firstChar = greetee.getName().charAt(0);
        if (firstChar != 'z' && firstChar != 'Z') {
            SoapFault fault = createFaultFor(greetee);
            throw new SoapFaultException(fault);
        }
        return new Welcome("Howdy " + greetee.getName() + "!");
    }
View Full Code Here


     * @param greetee
     * @return custom SOAP fault
     * @throws WsException on error creating SOAP Fault
     */
    private SoapFault createFaultFor(Greetee greetee) throws WsException {
        SoapFault fault = new SoapFault(SoapFault.FAULT_CODE_SERVER, "ZorroFault in welcomeService",
            "http://example.ws.jibx.org/someactor");
        ZorroFault zorroFault = new ZorroFault(greetee.getName());
        fault.addDetailWriter(new MarshallingOutHandler(zorroFault));
        return fault;
    }
View Full Code Here

                    e = wrapped;
                }
            }
   
            SoapProcessor soapProcessor = ((SoapProcessor) processor);
            SoapFault fault;
            if (e instanceof SoapFaultException) {
                fault = ((SoapFaultException) e).getFault();
            } else if (e instanceof WsNotUnderstoodException) {
                fault = new SoapFault(SoapFault.FAULT_CODE_MUST_UNDERSTAND, e.getMessage(), null);
            } else {
                fault = new SoapFault(SoapFault.FAULT_CODE_SERVER, e.getMessage(), null);
                if (m_includeStackTrace) {
                    fault.addDetailWriter(new ExceptionWriter(e, m_includeStackTrace));
                }
            }
            soapProcessor.sendFaultMessage(fault, outConn);
        } catch (Throwable ex) {
            logger.error("Error while processing prior error", ex);
View Full Code Here

TOP

Related Classes of org.jibx.ws.soap.SoapFault

Copyright © 2018 www.massapicom. 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.