Forum: Ruby on Rails ActionWebService and namespaces

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
9b945bfeebdf25fb6c9adc6ea7756c8c?d=identicon&s=25 Paul Stadig (Guest)
on 2006-04-07 17:01
Hi all,
I've tried to search the mailing list, web, etc. and haven't found
anything that seems to answer my question.

I have a WSDL for a web service written in Java, and I'm trying to
consume it in ruby using ActionWebService.  I've created my API and some
struct classes.  I've found the :namespace option to, but when I try to invoke an action
on the web service I get the following error:

: No Deserializer found to deserialize a
using encoding style ''.
[java.lang.IllegalArgumentException] (SOAP::FaultError)

From what I gather, this means that my namespaces and element names
(i.e. class names) are not matching up with those declared in the WSDL
file.  There are two problems:

1. The WSDL uses multiple namespaces (one for the SOAP action
declarations and one for the schema declarations for the input/output of
those actions, and some others), and I'm not sure which one I should be
sending to the :namespace option.  I've tried all of them in turn.  My
impression is that AWS expects the whole WSDL to use a single namespace
for declaration of actions, data, etc.

2. The XML element that I'm trying to send is actually
"rocis_ws_pra_service_ROCISSecurityBean", but in ruby, classes must be
capitalized so it's getting sent that way.

One of both of these could be contributing to my problem.  Is there a
way to declare an ActionWebService::Struct and tell it to use a specific
namespace and element name when it is marshalled?  Or can I somehow
convince ruby to allow me to declare a class with a name that starts
with a lowercase letter?

I'm not sure I can send the WSDL file, but if more information is needed
I can try to duplicate the problem with a clean room WSDL.

Paul Stadig
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-04-07 17:13
(Received via mailing list)
ActionWebService::Client::Soap is not a general-purpose client. If you
a interoperability with other SOAP frameworks, you are better of using
soap4r directly.

9b945bfeebdf25fb6c9adc6ea7756c8c?d=identicon&s=25 Paul Stadig (Guest)
on 2006-04-07 17:25
Thanks for the reply.  I was able to get it to work with soap4r, though
I had a bit of trouble figuring out how to use the wsdl2ruby script.

Paul Stadig
This topic is locked and can not be replied to.