4

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?

2
  • Three years have passed since you asked this question. Did you by any chance find a solution to using Protobuf with Apex code?
    – Sebastian
    Oct 10 '16 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. Oct 10 '16 at 19:33
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.