use of org.apache.hello_world_xml_http.wrapped.PingMeFault in project cxf by apache.
the class Client method main.
public static void main(String[] args) throws Exception {
if (args.length == 0) {
System.out.println("please specify wsdl");
System.exit(1);
}
URL wsdlURL;
File wsdlFile = new File(args[0]);
if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURI().toURL();
} else {
wsdlURL = new URL(args[0]);
}
System.out.println(wsdlURL);
XMLService ss = new XMLService(wsdlURL, SERVICE_NAME);
Greeter port = ss.getXMLPort();
String resp;
System.out.println("Invoking sayHi...");
resp = port.sayHi();
System.out.println("Server responded with: " + resp);
System.out.println();
System.out.println("Invoking greetMe...");
resp = port.greetMe(System.getProperty("user.name"));
System.out.println("Server responded with: " + resp);
System.out.println();
System.out.println("Invoking greetMeOneWay...");
port.greetMeOneWay(System.getProperty("user.name"));
System.out.println("No response from server as method is OneWay");
System.out.println();
try {
System.out.println("Invoking pingMe, expecting exception...");
port.pingMe();
} catch (PingMeFault ex) {
System.out.println("Expected exception: " + ex.getMessage());
}
System.exit(0);
}
use of org.apache.hello_world_xml_http.wrapped.PingMeFault in project cxf by apache.
the class GreeterImpl method pingMe.
public void pingMe() throws PingMeFault {
System.out.println("received calling PingMeFault!");
FaultDetail faultDetail = new FaultDetail();
faultDetail.setMajor((short) 2);
faultDetail.setMinor((short) 1);
throw new PingMeFault("PingMeFault raised by server", faultDetail);
}
Aggregations