Search in sources :

Example 1 with StreamInterceptor

use of demo.stream.interceptor.StreamInterceptor in project cxf by apache.

the class Client method main.

public static void main(String[] args) throws Exception {
    URL wsdlURL = Client.class.getResource("/wsdl/hello_world.wsdl");
    SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
    Greeter port = ss.getSoapPort();
    org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
    client.getInInterceptors().add(new StreamInterceptor());
    client.getInFaultInterceptors().add(new StreamInterceptor());
    System.out.println("Invoking sayHi...");
    String resp = port.sayHi();
    System.out.println("Server responded with: " + resp);
    System.out.println();
    System.exit(0);
}
Also used : SOAPService(org.apache.hello_world_soap_http.SOAPService) Greeter(org.apache.hello_world_soap_http.Greeter) StreamInterceptor(demo.stream.interceptor.StreamInterceptor) URL(java.net.URL)

Aggregations

StreamInterceptor (demo.stream.interceptor.StreamInterceptor)1 URL (java.net.URL)1 Greeter (org.apache.hello_world_soap_http.Greeter)1 SOAPService (org.apache.hello_world_soap_http.SOAPService)1