SOAP / WSDL

J

Joe Van Dyk

Are there any examples of a Ruby program that publishes a WSDL and
runs a SOAP server and another Ruby program that is a client of that
server? My search-fu fails me.

Thanks,
Joe
 
J

James Edward Gray II

Are there any examples of a Ruby program that publishes a WSDL and
runs a SOAP server and another Ruby program that is a client of that
server? My search-fu fails me.

The Pickaxe II does have an example of using a WSDL file. I remember
seeing it just the other day. I believe it's just about reading a
WSDL file though...

James Edward Gray II
 
A

Adam Keys

Yeah, I saw that. I'd like to create one though, and
http://www.ruby-doc.org/stdlib/libdoc/wsdl/rdoc/ doesn't clear
anything up for me.

The definitive soap4r site is http://dev.ctor.org/soap4r. There are
a few examples there, plus a more up-to-date version of the soap4r
library. These examples (http://dev.ctor.org/soap4r/browser/trunk/
sample/wsdl/) should get you pointed in the right direction. I've
also found looking over the unit tests to be really helpful in
figuring out what's going on.

Hope that helps,
 
N

NAKAMURA, Hiroshi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
Are there any examples of a Ruby program that publishes a WSDL and
runs a SOAP server and another Ruby program that is a client of that
server? My search-fu fails me.

There's no support for WSDL 'generation' for now. I wish to create
ruby2wsdl.rb (there's already wsdl2ruby.rb) eventually but I have no
idea for now about how I can allow user to declare a type of parameter
in Ruby.

ActionWebService of Rails have a functionality something like that
though I still don't know well about it...

Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)

iD8DBQFC5Y4Qf6b33ts2dPkRAgJhAJ4xaFymfWOlFMX/OymA0YTYil5w/gCeNmA6
2H35BLbu/f/i4gQBYuTBryg=
=ZJhO
-----END PGP SIGNATURE-----
 
S

Scott Ellsworth

NAKAMURA said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,


There's no support for WSDL 'generation' for now. I wish to create
ruby2wsdl.rb (there's already wsdl2ruby.rb) eventually but I have no
idea for now about how I can allow user to declare a type of parameter
in Ruby.

This is one of the biggest missing pieces in ruby's wsdl support just
yet. (Perl has much the same problem.)

If your task is to expose a back end service implemented in Ruby to the
outside world, it is very handy to have a functioning wsdl, and it is
just hellish typing up a complicated wsdl by hand.

When I had to do much the same in Perl, I ended up creating stubs in
java, exposing them as an axis web service, then asking the server for
foo.bar?wsdl, and hacking that into shape. This gave me something I
could use with C#, Java, or Perl.

Scott
 
L

leon breedt

Rails's ActionWebService supports generation of WSDL. I've tried it and
it works. See http://aws.rubyonrails.com/. I believe you can use it
independantly of the rest of Rails.
It currently generates RPC-encoded WSDL, if that meets your requirements.

You'll want to customize the WSDL service name and namespace:

class WsController
wsdl_service_name 'MyApp'
wsdl_namespace 'http://myco.com/MyApp/1.0' # target/type namespace
end

As per the recommendations in the spec to differentiate your WSDL.

Leon
 
S

Scott Ellsworth

leon breedt said:
It currently generates RPC-encoded WSDL, if that meets your requirements.

You'll want to customize the WSDL service name and namespace:

class WsController
wsdl service name 'MyApp'
wsdl namespace 'http://myco.com/MyApp/1.0' # target/type namespace
end

As per the recommendations in the spec to differentiate your WSDL.

Neatokeen. Thanks!

Our WS wonk has been pleading for us to go to document literal of late,
but we still have some xml-rpc stuff in the corpus and will for a while.

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top