title: Generating .proto file from existing Java objects or xsd
body: <p>Does anyone know of any tools that will generate a .proto file? Either from an existing xsd or from existing Java objects?</p>
  
  <p>I am using <a href="http://cxf.apache.org/" rel="noreferrer">Apache CXF</a> to make a web service call. The returned object has been auto generated from an xsd.</p>
  
  <p>ok so I now want to pass this data using protocol buffers to another system. The object model is very complex and changes regularly - i.e. I get a new xsd every time the object model has changed. I would like to be able to auto generate a .proto file so that I can send data using google protocol buffers.</p>
  
  <p>I have been looking everywhere but have come stuck.</p>
  
  <p>I am happy to</p>
  
  <p>i.) generate .proto file from the xsd
  or
  ii.) generate .proto file from the Java objects (which have been generated from the xsd)</p>
  
  <p>I cannot find any way of doing this already short of writing something myself...
  Your help much appreciated</p>