Search in sources :

Example 1 with AttachmentService

use of org.eclipse.sw360.datahandler.thrift.attachments.AttachmentService in project sw360portal by sw360.

the class TestAttachmentClient method main.

public static void main(String[] args) {
    try {
        THttpClient thriftClient = new THttpClient("http://127.0.0.1:8080/attachmentservice/thrift");
        TProtocol protocol = new TCompactProtocol(thriftClient);
        AttachmentService.Iface client = new AttachmentService.Client(protocol);
    } catch (Exception e) {
        assert (false);
    }
}
Also used : TProtocol(org.apache.thrift.protocol.TProtocol) THttpClient(org.apache.thrift.transport.THttpClient) TCompactProtocol(org.apache.thrift.protocol.TCompactProtocol) THttpClient(org.apache.thrift.transport.THttpClient) AttachmentService(org.eclipse.sw360.datahandler.thrift.attachments.AttachmentService) TException(org.apache.thrift.TException) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 TException (org.apache.thrift.TException)1 TCompactProtocol (org.apache.thrift.protocol.TCompactProtocol)1 TProtocol (org.apache.thrift.protocol.TProtocol)1 THttpClient (org.apache.thrift.transport.THttpClient)1 AttachmentService (org.eclipse.sw360.datahandler.thrift.attachments.AttachmentService)1