I come from a Java background, where lately I’ve been using Castor to
generate Java objects from an XML schema and marshal/unmarshal XML
documents using the generated Java objects.
Is there a Ruby package that will allow me to do the same thing? I’ve
figured out how to use WSDL::XMLSchema::XSD2Ruby to create Ruby objects
from an XML schema, but it does not create the marshal/unmarshal methods
that allow me to load the objects with data from XML files.
I come from a Java background, where lately I’ve been using Castor to
generate Java objects from an XML schema and marshal/unmarshal XML
documents using the generated Java objects.
Is there a Ruby package that will allow me to do the same thing? I’ve
figured out how to use WSDL::XMLSchema::XSD2Ruby to create Ruby objects
from an XML schema, but it does not create the marshal/unmarshal methods
that allow me to load the objects with data from XML files.
soap4r has a tool wsdl2ruby that takes a wsdl definition and creates
classes that un/marshall to/from the XML data that comes
accross the wire when you make SOAP calls. Which would be very similar
to what you need. Thus you might want to have a look at wsdl2ruby.
I hope I’ve interpreted your question correctly…
*t
Thanks for the response Tom. I’ll take a look at the WSDL stuff. As a
side note, the xsd2ruby code I’m using actually belongs to the WSDL
module…
Bryan
Tomas P.'s Mailing L. wrote:
On Thu, 4 Oct 2007, Bryan R. wrote:
I come from a Java background, where lately I’ve been using Castor to
generate Java objects from an XML schema and marshal/unmarshal XML
documents using the generated Java objects.
Is there a Ruby package that will allow me to do the same thing? I’ve
figured out how to use WSDL::XMLSchema::XSD2Ruby to create Ruby objects
from an XML schema, but it does not create the marshal/unmarshal methods
that allow me to load the objects with data from XML files.
soap4r has a tool wsdl2ruby that takes a wsdl definition and creates
classes that un/marshall to/from the XML data that comes
accross the wire when you make SOAP calls. Which would be very similar
to what you need. Thus you might want to have a look at wsdl2ruby.
I hope I’ve interpreted your question correctly…
*t
–
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.