
no.tornado.brap.examples.spring.SpringClientExample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brap-examples Show documentation
Show all versions of brap-examples Show documentation
Examples for BRAP client and server usage, including BRAP-Spring.
The newest version!
package no.tornado.brap.examples.spring;
import no.tornado.brap.client.ServiceProxyFactory;
import no.tornado.brap.common.UsernamePasswordPrincipal;
import no.tornado.brap.examples.service.HelloService;
import java.io.FileInputStream;
import java.io.IOException;
public class SpringClientExample {
public static void main(String[] args) throws IOException {
UsernamePasswordPrincipal upp = new UsernamePasswordPrincipal("john", "secret");
HelloService service = ServiceProxyFactory.createProxy(HelloService.class, "http://localhost:8080/remoting/hello", upp);
System.out.println(service.sayHello("Hello"));
FileInputStream in = new FileInputStream("/Users/edvin/Movies/The.Dark.Knight.2008.1080p.BluRay.x264-CiNEFiLE.mkv");
service.sendLargeStream(in);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy