This example demonstrates building up of Dubbo rpc server and client with lightweight API. The API is quite simple and straightforward.
Follow steps below to run this example.
Run the command below to start the Dubbo rpc server
mvn clean package mvn -Dexec.mainClass=org.apache.dubbo.samples.provider.Application exec:java
Now, you have a server running on port 50052 which accepts triple protocol requests.
More usages of triple protocol can be found here:
There are two ways to test the server works as expected:
curl \ --header "Content-Type: application/json" \ --data '["Dubbo"]' \ http://localhost:50052/org.apache.dubbo.samples.api.GreetingsService/sayHi/
mvn -Dexec.mainClass=org.apache.dubbo.samples.client.Application exec:java