Skip to content

Instantly share code, notes, and snippets.

@solars
Created September 29, 2011 20:49
Show Gist options
  • Save solars/1251913 to your computer and use it in GitHub Desktop.
Save solars/1251913 to your computer and use it in GitHub Desktop.
module WSDL
NS_WSDL = 'http://schemas.xmlsoap.org/wsdl/'
class Operation
include HappyMapper
register_namespace 'wsdl', NS_WSDL
namespace 'wsdl'
tag 'operation'
attribute :name, String, :tag => 'name'
has_many :inputs, Input, :tag => 'input'
has_many :outputs, Output, :tag => 'output'
end
class PortType
include HappyMapper
register_namespace 'wsdl', NS_WSDL
namespace 'wsdl'
tag 'portType'
attribute :name, String, :tag => 'name'
has_many :operations, Operation, :tag => 'operation'
end
class Definition
include HappyMapper
register_namespace 'wsdl', NS_WSDL
namespace 'wsdl'
tag 'definitions'
has_many :port_types, PortType, :tag => 'portType'
has_many :messages, Message, :tag => 'message'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment