M
Marcin Tyman
Hi guys,
Here is a part of my code (part o my class):
@soaps<<SOAP::WSDLDriverFactory.new("http://#{@Address}:#{@wsPort}/#{wsdl}").create_rpc_driver()
def method_missing(m,*args)
@soaps.each do |soap|
begin
result = soap.send("#{m}",*args)
return result
rescue NoMethodError
end
end
raise NoMethodError
puts m
end
I invoke soap.send by passing #{m} (as a WS method name) and *args are
arguments of the method which are ruby primitives (int, float, string
etc.)
But the problem is that WebServices will change and instead of
primitives their methods will get WSDL objects i.e. like that:
<complexType name="Group">
<sequence>
<element name="id" type="xsd:int"/>
<element name="inherited" type="xsd:boolean"/>
<element name="name" nillable="true" type="soapenc:string"/>
<element name="parentGroupId" type="xsd:int"/>
<element name="priority" type="xsd:int"/>
<element name="roleId" type="xsd:int"/>
</sequence>
</complexType>
How to create such object in ruby. What library can I use?
Any help will be helful
Thanks in advance
Here is a part of my code (part o my class):
@soaps<<SOAP::WSDLDriverFactory.new("http://#{@Address}:#{@wsPort}/#{wsdl}").create_rpc_driver()
def method_missing(m,*args)
@soaps.each do |soap|
begin
result = soap.send("#{m}",*args)
return result
rescue NoMethodError
end
end
raise NoMethodError
puts m
end
I invoke soap.send by passing #{m} (as a WS method name) and *args are
arguments of the method which are ruby primitives (int, float, string
etc.)
But the problem is that WebServices will change and instead of
primitives their methods will get WSDL objects i.e. like that:
<complexType name="Group">
<sequence>
<element name="id" type="xsd:int"/>
<element name="inherited" type="xsd:boolean"/>
<element name="name" nillable="true" type="soapenc:string"/>
<element name="parentGroupId" type="xsd:int"/>
<element name="priority" type="xsd:int"/>
<element name="roleId" type="xsd:int"/>
</sequence>
</complexType>
How to create such object in ruby. What library can I use?
Any help will be helful
Thanks in advance