I realize this is probably a question better asked on the Ruby list, but I've tried that and haven't heard any response to my query there.

I'm having trouble using Ruby as a client to my XFire-based SOAP service. I've got a call that returns a complex type consisting of a handful of optional strings, and an optional array of strings. If the string values are set, Ruby happily translates them into String objects of the appropriate value. However, if the elements are empty (string length 0), I get an object. The problem is that its the same type of object used to represent the array of strings (whether or not its an empty array). An example is below.

I'm hoping someone can share the current Best Practice for writing a Ruby client to an XFIre service. I'd also be happy if someone could point me to an existing project I could use as an example.

Thank you,

Mark


---
An example:

Here's a snippet from the SOAP returned by XFire:

    <nameSuffix xmlns="http://core.whisper.ucsc.edu";>Esq</nameSuffix>
    <otherNames xmlns="http://core.whisper.ucsc.edu"/>
    <previousNames xmlns="http://core.whisper.ucsc.edu";>
<ns1:string xmlns:ns1="http:// rpc.whisper.ucsc.edu">previous_name_1</ns1:string> <ns1:string xmlns:ns1="http:// rpc.whisper.ucsc.edu">previous_name_2</ns1:string>
    </previousNames>

When I get these objects from Ruby's SOAP client (I'm not using Soap4r... at least not yet), I get elements with the following class types:

name suffix type = String
other names type = SOAP::Mapping::Object
previous names type = SOAP::Mapping::Object


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to