Class: WSDL::SOAP::ServletStubCreator
- Includes:
- ClassDefCreatorSupport
- Defined in:
- lib/wsdl/soap/servletStubCreator.rb
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
Instance Method Summary collapse
- #dump(service_name) ⇒ Object
-
#initialize(definitions, name_creator, modulepath = nil) ⇒ ServletStubCreator
constructor
A new instance of ServletStubCreator.
Methods included from ClassDefCreatorSupport
#assign_const, #basetype_mapped_class, #create_type_name, #dq, #dqname, #dump_method_signature, #mapped_class_basename, #mapped_class_name, #ndq, #nsym, #sym
Methods included from XSD::CodeGen::GenSupport
capitalize, constant?, #format, keyword?, safeconstname, safeconstname?, safemethodname, safemethodname?, safevarname, safevarname?, uncapitalize
Constructor Details
#initialize(definitions, name_creator, modulepath = nil) ⇒ ServletStubCreator
Returns a new instance of ServletStubCreator.
25 26 27 28 29 |
# File 'lib/wsdl/soap/servletStubCreator.rb', line 25 def initialize(definitions, name_creator, modulepath = nil) @definitions = definitions @name_creator = name_creator @modulepath = modulepath end |
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
23 24 25 |
# File 'lib/wsdl/soap/servletStubCreator.rb', line 23 def definitions @definitions end |
Instance Method Details
#dump(service_name) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/wsdl/soap/servletStubCreator.rb', line 31 def dump(service_name) warn("- Servlet stub can have only 1 port for now. So creating stub for the first port and rests are ignored.") services = @definitions.service(service_name) unless services raise RuntimeError.new("service not defined: #{service_name}") end ports = services.ports if ports.empty? raise RuntimeError.new("ports not found for #{service_name}") end port = ports[0] if port.porttype.nil? raise RuntimeError.new("porttype not found for #{port}") end dump_porttype(port.porttype) end |