I am trying to consume a .NET webservice from
http://ws.melissadata.com/dqws/address.asmx
Whenever I call soap.doSingleRecord I receive an error saying that I
have an
“Empty XML Request Structure”. Looking at the sample SOAP request it
appears
that all the settings I am sending need to be wrapped in tags.
So
it lookes like I need to build a seperate Request object and then send
that
with soap.doSingleRecord(Request)… does anyone have any ideas about
how to
make this work? Thanks for any help…
From the controller:
def update_client_address
@clients = Client.find(:all, :include => “matters”, :conditions =>
[“matters.imported_at = ?”, $now])
factory =
SOAP::WSDLDriverFactory.new(“http://ws.melissadata.com/dqws/address.asmx?WSDL”)
soap = factory.create_rpc_driver
soap.default_encodingstyle =
SOAP::EncodingStyle::ASPDotNetHandler::Namespace
for client in @clients
soapResponse = soap.doSingleRecord(:CustomerID => mycustid,
:Action => “Request”,
:Timeout => 10,
:Version => “1.0”,
:City => client.city,
:State => client.state,
:Zip5 => client.zipcode,
:Address => client.address)
…
soap.reset_stream
end
Sample SOAP request that needs to be received for doSingleRecord:
POST /dqws/address.asmx HTTP/1.1
Host: ws.melissadata.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: “urn:mdWebService/doSingleRecord”
<soap:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/”>
soap:Body
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
</soap:Body>
</soap:Envelope>
View this message in context:
http://www.nabble.com/Need-help-with-SOAP-and-.NET-tf2037203.html#a5606229
Sent from the RubyOnRails Users forum at Nabble.com.