I'd like to call out to a Web Service from an Apex class. The Web Service is basically a .NET WCF service that speaks ProtoBuffers.

In the .NET/Java world there a bunch of libraries that can speak Proto Buffers, but I see none in Salesforce world.

So is there a way to decompose Proto Buffer messages in the Salesforce world?

  • Three years have passed since you asked this question. Did you by any chance find a solution to using Protobuf with Apex code?
    – Sebastian
    Commented Oct 10, 2016 at 16:17
  • 2
    @Vasile No, I did not . What I ended doing is creating a proxy web service that would convert from Protobuf to JSON and vice versa. There was a bit of a speed hit, but we've learned to live with it. Commented Oct 10, 2016 at 19:33

1 Answer 1


Some quick research on ProtoBuff shows it's a binary protocol over the wire, and if that's the case then there's not much you can do on salesforce to work with them. The binary manipulation tools in apex are nearly non-existent outside of base64 and string manipulation.

Realistically, there's nothing that's going to be efficient, reliable, and sane to work with for dealing with the binary format of ProtoBuff on force.com. If you can use the text representation (which appears to be JSON if I'm not mistaken) then that should be workable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .