Send XML Document with SOAP

Hello,

yes it’s another ruby-nuby question but i cant find the right docs so I
hope either someone has an answer or can provide links to what i havent
been able to find.

I am trying to call a wsdl web service running on .net server with a
ruby client. I can make the request and with a wiredump I see the SOAP
request and responce XML files, the files are correct but I am not sure
why I can not access the results.

++++++++++++++++++++++++++++++++++++++++

require “rexml/document”
service = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
result = service.GetAnswer(:question=>‘tuition’,:id=>‘64’)
doc = REXML::Document.new result
render_text doc.to_s

++++++++++++++++++++++++++++++++++++++++
this is what I get
++++++++++++++++++++++++++++++++++++++++

“SOAP::Mapping::Object is not a valid input stream. It must be
either a String, IO, StringIO or Source.”

++++++++++++++++++++++++++++++++++++++++
why is the result not an XML string? it appears as if result is empty
eveI have tried converting the result to a sting but it give me another
error suggesting that the result variable is empty
++++++++++++++++++++++++++++++++++++++++

#<REXML::ParseException: malformed XML: missing tag start
Line:
Position:
Last 80 unconsumed characters:
SOAP::Mapping::Object:0x3761048>

+++++++++++++++++++++++++++++++++++++++++
any assistance would be greatly appreciated.

thanks, Arlen Thurber

here is the SOAP responce I am recieving, is there a problem with the
way it is trying to send an XML document with in the SOAP responce? It
works fine in JAVA but i am wondering if there is an issue with the way
RUBY parses the SOAP responce.

<?xml version="1.0" encoding="utf-8" ?>

encoding=“utf-16”?>186860<![CDATA[

Cal Poly’s 6,000+ acre campus is located in San Luis Obispo, California, midway between San Francisco and Los A., making the university one of the largest campuses in the nation in terms of physical size.

The surrounding area boasts mild temperatures year round and offers many types of outdoor recreation including the Pacific beaches, local mountain areas and nearby lakes.

Some of these areas are: Pismo Beach, Avila Beach, Morro Bay, Lake Lopez, Lake Nacimiento, Lake San Antonio, Hearst Castle, Bishop's Peak and Madonna Mountain.

Directions and visitor information.

]]>

</soap:Body>
</soap:Envelope>