Search in sources :

Example 1 with VendorService

use of org.eclipse.sw360.datahandler.thrift.vendors.VendorService in project sw360portal by sw360.

the class TestVendorClient method main.

public static void main(String[] args) throws TException, IOException {
    THttpClient thriftClient = new THttpClient("http://127.0.0.1:8080/vendorservice/thrift");
    TProtocol protocol = new TCompactProtocol(thriftClient);
    VendorService.Iface client = new VendorService.Client(protocol);
    List<Vendor> vendors = client.getAllVendors();
    reportFindings(vendors);
    System.out.println("Now looking for matches starting with 'm' from vendor service");
    reportFindings(client.searchVendors("m"));
}
Also used : VendorService(org.eclipse.sw360.datahandler.thrift.vendors.VendorService) TProtocol(org.apache.thrift.protocol.TProtocol) THttpClient(org.apache.thrift.transport.THttpClient) Vendor(org.eclipse.sw360.datahandler.thrift.vendors.Vendor) TCompactProtocol(org.apache.thrift.protocol.TCompactProtocol) THttpClient(org.apache.thrift.transport.THttpClient)

Aggregations

TCompactProtocol (org.apache.thrift.protocol.TCompactProtocol)1 TProtocol (org.apache.thrift.protocol.TProtocol)1 THttpClient (org.apache.thrift.transport.THttpClient)1 Vendor (org.eclipse.sw360.datahandler.thrift.vendors.Vendor)1 VendorService (org.eclipse.sw360.datahandler.thrift.vendors.VendorService)1