N
nkb
Hi.
I have tried for a hours but I still cannot get it. What is wrong with
my codes? I keep getting this error
#<SOAP:Mapping::Object:0x2bb0e90>: Fault occurred -->
System.Xml.XmlElement (SOAP::FaultError)
Below is my code to access the webservice. According to the logs from
the webservice server, I am able to access to the webservice. But there
seems to be something wrong in the way I place my input argument.
#######
require 'soap/rpc/driver'
Host = "http://mysite/serviceA/serviceA1.asmx"
NS = "urn:mysite.co.uk:webservices"
client = SOAP::RPC:river.new(Host, NS)
client.add_method_with_soapaction('mygetData', 'getData', 'dataID')
p client.mygetData(1)
#######
And this is the webservice statements from the server. It says this is
how I should form my soap request.
<?xml version="1.0" encoding="utf-8"?>
<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>
<getData xmlns="urn:mysite.co.uk:webservices">
<DataID>int</DataID>
<inputstring>
<string>string</string>
<string>string</string>
</inputstring>
</getData>
</soap:Body>
</soap:Envelope>
I have tried for a hours but I still cannot get it. What is wrong with
my codes? I keep getting this error
#<SOAP:Mapping::Object:0x2bb0e90>: Fault occurred -->
System.Xml.XmlElement (SOAP::FaultError)
Below is my code to access the webservice. According to the logs from
the webservice server, I am able to access to the webservice. But there
seems to be something wrong in the way I place my input argument.
#######
require 'soap/rpc/driver'
Host = "http://mysite/serviceA/serviceA1.asmx"
NS = "urn:mysite.co.uk:webservices"
client = SOAP::RPC:river.new(Host, NS)
client.add_method_with_soapaction('mygetData', 'getData', 'dataID')
p client.mygetData(1)
#######
And this is the webservice statements from the server. It says this is
how I should form my soap request.
<?xml version="1.0" encoding="utf-8"?>
<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>
<getData xmlns="urn:mysite.co.uk:webservices">
<DataID>int</DataID>
<inputstring>
<string>string</string>
<string>string</string>
</inputstring>
</getData>
</soap:Body>
</soap:Envelope>