1.
I want to write a SOAP server based on an existing WSDL specification.
Coming from .Net I have only solved SOAP issues (once) by using
autogenerated code from WSDL's. And there is no such thing in Ruby if I
understand correctly. What is the approach to manually creating a SOAP
server interface accoring to a WSDL?
2.
While searching around in this forum I found this statement: "Dyanamic
languages like Ruby don't really need WSDL,".
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/c0fbd6dfceab4c0/5c58c7f75865937d?q=generate+server+wsdl&rnum=4#5c58c7f75865937d
Why?
Thanx,
Henning Jansen
I'm not a SOAP or WSDL expert so I can't answer your first question,
but as for your second:
Dynamic languages like Ruby don't need something like WSDL because
method calls can be intercepted and/or created on the fly. There is no
need for hard interfaces or static declarations that languages like
Java or C++ would need. For more information read the documentation
for the Ruby methods called "method_missing" and "define_method", and
also take a look at Ruby's distributed object library called DRb.
Ryan
> I'm not a SOAP or WSDL expert so I can't answer your first question,
> but as for your second:
>
> Dynamic languages like Ruby don't need something like WSDL because
> method calls can be intercepted and/or created on the fly. There is no
> need for hard interfaces or static declarations that languages like
> Java or C++ would need. For more information read the documentation
> for the Ruby methods called "method_missing" and "define_method", and
> also take a look at Ruby's distributed object library called DRb.
WSDL is not (just) about static type declarations. It is a way of
publishing a list of services and how to invoke them. For example, Web
sites are an instance of dynamic method invocation, but you still need
to know a URL before you can hit it. You can try fetching arbitrary
pages from sites, but it would be better to know the valid URLs and what
they will return.
WSDL may be something like Ruby's "respond_to?" or "public_methods".
The services defined by WSDL do not have to map to any particular code
at the end point; the end point is simple using WSDL to assert that, if
you send a message in a given format, it will do something useful. As
with Ruby code, exactly how that happens is none of the client's
business; the client and message sent need not know anything about the
implementation, and your entire Web service could be built around
method_missing. But that doesn't make a public services description
less usefull; clients may still need it to determine if you offer what
they want.
James
--
http://www.ruby-doc.org - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools
Hi,
jansenh wrote:
> Hi group, this is another RubyNewbie...
> 1.
> I want to write a SOAP server based on an existing WSDL specification.
> Coming from .Net I have only solved SOAP issues (once) by using
> autogenerated code from WSDL's. And there is no such thing in Ruby if I
> understand correctly. What is the approach to manually creating a SOAP
> server interface accoring to a WSDL?
SOAP module bundled with Ruby distribution does not have that but
there's 'wsdl2ruby.rb' in original soap4r distributions. It may help you.
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
iD8DBQFDdsvZf6b33ts2dPkRAp7RAJ4kWwyzpnb54lVOL1MItfRmCeAYdACeKJgh
9Co72LhyWnjtAq6vjTKUyjk=
=H2Re
-----END PGP SIGNATURE-----
Hi,
Austin Ziegler wrote:
>> SOAP module bundled with Ruby distribution does not have that but
>> there's 'wsdl2ruby.rb' in original soap4r distributions. It may help you.
>
> Should this perhaps be bundled with Ruby if we're going to be offering
> soap4r bundled with Ruby?
I was thinking so at first, too. But I didn't want to take pollution to
bin directory of users.
Now I'm thinking so too from another reason. wsdl2ruby.rb is for
developer as a part of SDK. Developers should obtain it with samples
and a link to development site. (Document? Oh I wish it exists.)
Soap4r runtime is bundled with ruby.
Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
iD8DBQFDetVHf6b33ts2dPkRAj1WAJ4qsawRk21JKazdScley/rItqNAZwCgwAfy
aWrnLVpDCJlbgKTqLtm2Leg=
=udWI
-----END PGP SIGNATURE-----
> Now I'm thinking so too from another reason. wsdl2ruby.rb is for
> developer as a part of SDK. Developers should obtain it with samples
> and a link to development site. (Document? Oh I wish it exists.)
>
> Soap4r runtime is bundled with ruby.
Ok. That makes sense. The only thing that might then be useful is to
have a soap4r-devel.gem available ;)
-austin
--
Austin Ziegler * halos...@gmail.com
* Alternate: aus...@halostatue.ca