[Rprotobuf-yada] it never actually worked

Romain François francoisromain at free.fr
Thu Dec 10 17:17:21 CET 2009


Hi,

So I was testing out the rpc over http client when I realized that the 
package only ever worked with compiled message types, so only the ones 
that we explicitly compile (addressbook).

This is fixed now (I hope) and we can use both compiled in messages (the 
ones from addressbook.proto, but also the ones used internally by the 
protobuf lib).



So I have pushed a hello world rpc example :

package rprotobuf ;
option java_package = "org.rproject.rprotobuf" ;
option java_outer_classname = "HelloWorld" ;

message HelloWorldRequest{}
message HelloWorldResponse{
	required string message = 1;
}
service HelloWorldService{
	rpc HelloWorld(HelloWorldRequest) returns(HelloWorldResponse);
}

which should work now (if the server runs:)

 > p <- new( rprotobuf.HelloWorldRequest )
 > http <- new( "RpcHTTP", host = "127.0.0.1", port = 4444L)
 > result <- invoke( rprotobuf.HelloWorldService.HelloWorld, p, http)
sending http request
headers : sent 95 bytes
reading 52 bytes
complete line: {HTTP/1.1 200 OK}
complete line: {Content-length: 13}
header 'content-length' => '13'
end of request - moving to body
 > writeLines( result$toString() )
message: "hello world"


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/Gq7i : ohloh
|- http://tr.im/FtUu : new package : highlight
`- http://tr.im/EAD5 : LondonR slides



More information about the Rprotobuf-yada mailing list