/** * Constructor for JaxWsSoapFaultException. * @param original the original JAX-WS SOAPFaultException to wrap */ public JaxWsSoapFaultException(SOAPFaultException original) { super(original.getMessage(), original); }
/** * Constructor for JaxWsSoapFaultException. * @param original the original JAX-WS SOAPFaultException to wrap */ public JaxWsSoapFaultException(SOAPFaultException original) { super(original.getMessage(), original); }
versionComment ); } catch ( SOAPFaultException e ) { if ( e.getMessage().contains( UnifiedRepositoryUpdateFileException.PREFIX ) ) { throw new KettleException( BaseMessages.getString( PKG, "PurRepository.fileUpdateException", file.getName() ) ); new NodeRepositoryFileData( objectTransformer.elementToDataNode( element ) ), versionComment ); } catch ( SOAPFaultException e ) { if ( e.getMessage().contains( UnifiedRepositoryCreateFileException.PREFIX ) ) { throw new KettleException( BaseMessages.getString( PKG, "PurRepository.fileCreateException", file.getName() ) );
public String getMessage() { return "Client received SOAP Fault from server: " + super.getMessage() + " Please see the server log to find more detail regarding exact cause of the failure."; } }
public String getMessage() { return "Client received SOAP Fault from server: " + super.getMessage() + " Please see the server log to find more detail regarding exact cause of the failure."; } }
/** * Constructor for JaxWsSoapFaultException. * @param original the original JAX-WS SOAPFaultException to wrap */ public JaxWsSoapFaultException(SOAPFaultException original) { super(original.getMessage(), original); }
public String getMessage() { return "Client received SOAP Fault from server: " + super.getMessage() + " Please see the server log to find more detail regarding exact cause of the failure."; } }
/** * Constructor for JaxWsSoapFaultException. * @param original the original JAX-WS SOAPFaultException to wrap */ public JaxWsSoapFaultException(SOAPFaultException original) { super(original.getMessage(), original); }
public static void doubleIt(DoubleItPortType port, int numToDouble) { try { int resp = port.doubleIt(numToDouble); System.out.println("The number " + numToDouble + " doubled is " + resp); } catch (SOAPFaultException e) { System.out.println("SOAP Call Error: " + e.getMessage()); } } }
private static void doubleIt(DoubleItPortType port, int numToDouble) { try { System.out.println("The number " + numToDouble + " doubled is " + port.doubleIt(numToDouble)); } catch (DoubleNumber316Fault e) { System.out.println("316 Fault: " + e.getMessage() + "; basic fault text: " + e.getFaultInfo().getErrorDetails()); } catch (DoubleOddNumberFault e) { System.out.println("Odd number fault: " + e.getMessage() + "; basic fault text: " + e.getFaultInfo().getErrorDetails()); } catch (SOAPFaultException e) { System.out.println("SOAPFaultException: " + e.getMessage()); } } }
public static DispositionReportFaultMessage MapException(SOAPFaultException ex) { org.uddi.api_v3.DispositionReport r = new org.uddi.api_v3.DispositionReport(); r.setTruncated(false); r.getResult().addAll(MapFault(ex.getFault())); DispositionReportFaultMessage x = new DispositionReportFaultMessage(ex.getMessage(), r); return x; }
private void setFault(Message msg, SOAPFaultException e) { SOAPFault fault = e.getFault(); Detail detail = fault.getDetail(); if (detail != null) { for (Iterator i = detail.getDetailEntries(); i.hasNext();) { DetailEntry entry = (DetailEntry)i.next(); FaultException fe = new FaultException(e.getMessage(), entry, e); fe.setFaultName(entry.getElementQName()); msg.setFaultBody(fe); } } else { msg.setFaultBody(e); } }
@Test public void testValidationFailureOnServerOut() throws Exception { FixedArray x = new FixedArray(); FixedArray yOrig = new FixedArray(); x.getItem().addAll(Arrays.asList(24, 42, 2008)); yOrig.getItem().addAll(Arrays.asList(24, 0, 1)); Holder<FixedArray> y = new Holder<>(yOrig); Holder<FixedArray> z = new Holder<>(); try { docClient.testFixedArray(x, y, z); fail("should have thrown exception"); } catch (SOAPFaultException ex) { assertTrue(ex.getMessage(), ex.getMessage().contains("Marshalling")); } }
@Test public void testNewLineInExceptionMessage() throws Exception { Greeter greeter = getGreeter(); try { greeter.greetMe("newline"); fail("Should throw Exception!"); } catch (SOAPFaultException ex) { assertEquals("greetMeFault Caused by: Get a wrong name <greetMe>", ex.getMessage()); StackTraceElement[] elements = ex.getCause().getStackTrace(); assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11", elements[0].getClassName()); assertTrue(ex.getCause().getCause().getMessage().endsWith("Test \n cause.")); } }
@Test public void testFaultMessage() throws Exception { Greeter greeter = getGreeter(); try { greeter.sayHi(); fail("Should throw Exception!"); } catch (SOAPFaultException ex) { assertEquals("sayHiFault Caused by: Get a wrong name <sayHi>", ex.getMessage()); StackTraceElement[] element = ex.getCause().getStackTrace(); assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl12", element[0].getClassName()); } }
@Test public void testSOAPHandlerHandleMessageThrowsRuntimeExceptionServerInbound() throws PingException { try { handlerTest.pingWithArgs("soapHandler3 inbound throw RuntimeException"); fail("did not get expected exception"); } catch (SOAPFaultException e) { assertEquals("HandleMessage throws exception", e.getMessage()); } }
@Test public void testSOAPHandlerHandleMessageThrowsRuntimeExceptionServerOutbound() throws PingException { try { handlerTest.pingWithArgs("soapHandler3 outbound throw RuntimeException"); fail("did not get expected exception"); } catch (SOAPFaultException e) { assertEquals("HandleMessage throws exception", e.getMessage()); } }
@Test public void testSOAPHandlerHandleFaultThrowsSOAPFaultExceptionServerOutbound() throws PingException { try { handlerTest.pingWithArgs("soapHandler3 inbound throw ProtocolException " + "soapHandler4HandleFaultThrowsSOAPFaultException"); fail("did not get expected SOAPFaultException"); } catch (SOAPFaultException e) { assertEquals("soapHandler4 HandleFault throws SOAPFaultException", e.getMessage()); } }
@Test public void testRPCLit() throws Exception { Person person = new Person(); person.setFirstName("Foo"); person.setLastName("Bar"); //this should work rpcClient.saveValidateOut(person); try { person.setFirstName(null); rpcClient.saveValidateOut(person); fail("Expected exception"); } catch (SOAPFaultException sfe) { assertTrue(sfe.getMessage().contains("Marshalling Error")); assertTrue(sfe.getMessage().contains("lastName")); } }
@Test public void testResponseValidationWithClientValidationDisabled() { Person person = new Person(); try { person.setFirstName("InvalidResponse"); person.setLastName("WhoCares"); annotatedNonValidatingClient.saveValidateOut(person); } catch (SOAPFaultException sfe) { // has to be server side exception, as all validation is disabled on client assertTrue(sfe.getMessage().contains("Marshalling Error")); } }