use of org.apache.hello_world_soap12_http.PingMeFault in project cxf by apache.
the class Soap12ClientServerTest method testPingMeFault.
@Test
public void testPingMeFault() throws Exception {
Greeter greeter = getGreeter();
try {
greeter.pingMe();
fail("Should throw Exception!");
} catch (PingMeFault ex) {
FaultDetail detail = ex.getFaultInfo();
assertEquals((short) 2, detail.getMajor());
assertEquals((short) 1, detail.getMinor());
assertEquals("PingMeFault raised by server", ex.getMessage());
}
}
use of org.apache.hello_world_soap12_http.PingMeFault in project cxf by apache.
the class GreeterImpl12 method pingMe.
public void pingMe() throws PingMeFault {
FaultDetail faultDetail = new FaultDetail();
faultDetail.setMajor((short) 2);
faultDetail.setMinor((short) 1);
LOG.info("Executing operation pingMe, throwing PingMeFault exception");
System.out.println("Executing operation pingMe, throwing PingMeFault exception\n");
throw new PingMeFault("PingMeFault raised by server", faultDetail);
}
use of org.apache.hello_world_soap12_http.PingMeFault in project cxf by apache.
the class GreeterImpl method pingMe.
public void pingMe() throws PingMeFault {
FaultDetail faultDetail = new FaultDetail();
faultDetail.setMajor((short) 2);
faultDetail.setMinor((short) 1);
LOG.info("Executing operation pingMe, throwing PingMeFault exception");
// System.out.println("Executing operation pingMe, throwing PingMeFault exception\n");
throw new PingMeFault("PingMeFault raised by server", faultDetail);
}
use of org.apache.hello_world_soap12_http.PingMeFault in project cxf by apache.
the class Soap12ClientServerTest method testPingMeFault.
@Test
public void testPingMeFault() throws Exception {
Greeter greeter = getGreeter();
try {
greeter.pingMe();
fail("Should throw Exception!");
} catch (PingMeFault ex) {
FaultDetail detail = ex.getFaultInfo();
assertEquals((short) 2, detail.getMajor());
assertEquals((short) 1, detail.getMinor());
assertEquals("PingMeFault raised by server", ex.getMessage());
StackTraceElement[] element = ex.getStackTrace();
assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl12", element[0].getClassName());
}
}
Aggregations