I am currently working on a simple WS Client and have run across a very
odd and frustrating issue. My fruitless hours of googling have brought
me here in the hopes someone might help shed light on the situation.
The following code connects to the WSDL listed and attempts to run a
function called getBPList with the last three parameters being left
blank as they are optional.
require 'soap/wsdlDriver'
wsdl_url = "http://usint.skire.com/ws/services/mainservice?WSDL"
soap = SOAP::WSDLDriverFactory.new('skire.wsdl').create_rpc_driver
soap.wiredump_file_base="soapresult"
result = soap.getBPList("one", "two", "three", "four", "five", "six",
"seven")
I have replaced the actual values because they contain private data, but
none the less the issue remains. The real issue is that the fourth
value as well as the subsequent values are not included in the request
generated by the WSDLDriver. What follows is the erroneous request:
<?xml version="1.0" encoding="utf-8" ?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<n1:getBPList
xmlns:n1="http://general.service.webservices.messenger.skire.com"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<shortname xsi:type="xsd:string">one</shortname>
<authcode xsi:type="xsd:string">two</authcode>
<projectNumber xsi:type="xsd:string">three</projectNumber>
<BPName xsi:nil="true"></BPName>
<fieldnames n2:arrayType="xsd:string[0]"
xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="n2:Array">
</fieldnames>
<filterCondition xsi:type="xsd:string"></filterCondition>
<filterValues xmlns:n3="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="n3:Array"
n3:arrayType="xsd:string[0]">
</filterValues>
</n1:getBPList>
</env:Body>
</env:Envelope>
You see that the line "<BPName xsi:nil="true"></BPName>" contains no
value, even though it is explicitly set in the function call.
I have run myself ragged modifying these values to highlight where this
goes wrong. I've even run this through the Ruby debugger to no avail.
I simply cannot find where this value as well as the subsequent values
are being ignored.
If anyone has any help I would greatly appreciate it. Feel free to look
at the WSDL and run the test code as you see fit. If run from the 'irb'
and you receive an error back from Skire you can simply ignore it. I've
safely ruled out any issue on their end as the request file proves that
it was not formed correctly.
Thanks,
Chris
···
--
Posted via http://www.ruby-forum.com/.