# Web Services Issue

**URL:** <https://www.ruby-forum.com/t/web-services-issue/62162>\
**Category:** Ruby\
**Created:** [June 1, 2006, 12:17am UTC](https://www.ruby-forum.com/t/web-services-issue/62162 "2006-06-01T00:17:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 1, 2006, 12:17am UTC](https://www.ruby-forum.com/t/web-services-issue/62162/1 "2006-06-01T00:17:04Z")

</div>

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](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=“[XML Schema](http://www.w3.org/2001/XMLSchema)”  
xmlns:env=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”  
xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”\>  
env:Body  
\<n1:getBPList  
xmlns:n1=“[http://general.service.webservices.messenger.skire.com](http://general.service.webservices.messenger.skire.com)”  
env:encodingStyle=“[http://schemas.xmlsoap.org/soap/encoding/](http://schemas.xmlsoap.org/soap/encoding/)”\>  
one  
two  
three  
  
  
  
  
  
  
\</n1:getBPList\>  
\</env:Body\>  
\</env:Envelope\>

You see that the line “” 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

---

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 1, 2006, 5:24am UTC](https://www.ruby-forum.com/t/web-services-issue/62162/2 "2006-06-01T05:24:53Z")

</div>

On May 31, 2006, at 5:17 PM, chris Johansen wrote:

> require ‘soap/wsdlDriver’
> 
> wsdl\_url = “[http://usint.skire.com/ws/services/mainservice?WSDL](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”)

Chuck R.  
removed\_email\_address@domain.invalid  
[www.familyvideovault.com](http://www.familyvideovault.com) (not yet live!)

I didn’t actually run this code, but just eyeballing it I think I see  
an error. You are fetching the WSDL and storing it as ‘wsdl\_url’ but  
I don’t see you using it to create your soap driver. I think the line  
ought to be:

soap = SOAP::WSDLDriverFactory.new(wsdl\_url).create\_rpc\_driver

Or maybe I’m wrong. Give it a try and see.

cr

---

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 1, 2006, 8:01pm UTC](https://www.ruby-forum.com/t/web-services-issue/62162/3 "2006-06-01T20:01:41Z")

</div>

On Jun 1, 2006, at 11:53 AM, Chris Johansen wrote:

> > > 
> > 
> > I don’t see you using it to create your soap driver. I think the line  
> > the  
> > wsdl to rule out there being any issues on the network. You are  
> > correct  
> > that the line should infact read:
> 
> soap = SOAP::WSDLDriverFactory.new(wsdl\_url).create\_rpc\_driver
> 
> The issue continues regardless of which one I am using (local or from  
> the site). Thanks for catching my mistake. The issue is still  
> exists,  
> however.

Chris,

I got it to work. Here’s what I did.

I downloaded the wsdl file to a local file and looked at the method  
call in detail. I noticed something interesting and out of place.  
Look at this definition and take a close look at capitalization:

```
<wsdl:message name="getBPListRequest">

   <wsdl:part name="shortname" type="xsd:string"/>

   <wsdl:part name="authcode" type="xsd:string"/>

   <wsdl:part name="projectNumber" type="xsd:string"/>

   <wsdl:part name="BPName" type="xsd:string"/>

   <wsdl:part name="fieldnames" type="impl:ArrayOf_xsd_string"/>

   <wsdl:part name="filterCondition" type="xsd:string"/>

   <wsdl:part name="filterValues" type="impl:ArrayOf_xsd_string"/>

</wsdl:message>

```

Please notice that the fourth element, the one that is consistently  
screwed up, has a name starting with a cap letter. So what I did was  
create an edited version of the wsdl and changed that name from  
“BPName” to “bpName” in both places it shows up (for that specific  
method definition). I then ran your code again and it produced the  
correct soap request as shown below:

\<env:Envelope xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”  
xmlns:env=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”  
xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”\>  
env:Body  
\<n1:getBPList xmlns:n1=“http://  
[general.service.webservices.messenger.skire.com](http://general.service.webservices.messenger.skire.com)”  
env:encodingStyle=“[http://schemas.xmlsoap.org/soap/encoding/](http://schemas.xmlsoap.org/soap/encoding/)”\>  
one  
two  
three  
four  
  
five  
  
six  
  
seven  
  
\</n1:getBPList\>  
\</env:Body\>  
\</env:Envelope\>

I don’t know if the SOAP standard allows for those names to start  
with capitals, but for sure the ruby code doesn’t handle it correctly.

I imagine the right way to fix this is to check the SOAP standard to  
see what it says (or if it’s mute on the topic of capitalization) and  
then, depending on that answer, modify the SOAP library to downcase  
these strings or just the first letter.

Anyway, mystery solved!

cr

---

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 1, 2006, 6:53pm UTC](https://www.ruby-forum.com/t/web-services-issue/62162/4 "2006-06-01T18:53:27Z")

</div>

unknown wrote:

> On May 31, 2006, at 5:17 PM, chris Johansen wrote:
> 
> > require ‘soap/wsdlDriver’
> > 
> > wsdl\_url = “[http://usint.skire.com/ws/services/mainservice?WSDL](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”)
> 
> Chuck R.  
> removed\_email\_address@domain.invalid  
> [www.familyvideovault.com](http://www.familyvideovault.com) (not yet live!)
> 
> I didn’t actually run this code, but just eyeballing it I think I see  
> an error. You are fetching the WSDL and storing it as ‘wsdl\_url’ but  
> I don’t see you using it to create your soap driver. I think the line  
> ought to be:
> 
> soap = SOAP::WSDLDriverFactory.new(wsdl\_url).create\_rpc\_driver
> 
> Or maybe I’m wrong. Give it a try and see.
> 
> cr

OOPS! No that’s a mistake in my not checking it closely enough when I  
posted it. I appologize. At some point I had made a local copy of the  
wsdl to rule out there being any issues on the network. You are correct  
that the line should infact read:

soap = SOAP::WSDLDriverFactory.new(wsdl\_url).create\_rpc\_driver

The issue continues regardless of which one I am using (local or from  
the site). Thanks for catching my mistake. The issue is still exists,  
however.

Chris

---

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 1, 2006, 9:38pm UTC](https://www.ruby-forum.com/t/web-services-issue/62162/5 "2006-06-01T21:38:27Z")

</div>

> Chris,
> 
> I got it to work. Here’s what I did.
> 
> I downloaded the wsdl file to a local file and looked at the method  
> call in detail. I noticed something interesting and out of place.  
> Look at this definition and take a close look at capitalization:
> 
> ```
> <wsdl:message name="getBPListRequest">
> 
> <wsdl:part name="shortname" type="xsd:string"/>
> 
> <wsdl:part name="authcode" type="xsd:string"/>
> 
> <wsdl:part name="projectNumber" type="xsd:string"/>
> 
> <wsdl:part name="BPName" type="xsd:string"/>
> 
> <wsdl:part name="fieldnames" type="impl:ArrayOf_xsd_string"/>
> 
> <wsdl:part name="filterCondition" type="xsd:string"/>
> 
> <wsdl:part name="filterValues" type="impl:ArrayOf_xsd_string"/>
> 
> </wsdl:message>
> 
> ```
> 
> Please notice that the fourth element, the one that is consistently  
> screwed up, has a name starting with a cap letter. So what I did was  
> create an edited version of the wsdl and changed that name from  
> “BPName” to “bpName” in both places it shows up (for that specific  
> method definition). I then ran your code again and it produced the  
> correct soap request as shown below:
> 
> \<env:Envelope xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”  
> xmlns:env=“[http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)”  
> xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”\>  
> env:Body  
> \<n1:getBPList xmlns:n1=“http://  
> [general.service.webservices.messenger.skire.com](http://general.service.webservices.messenger.skire.com)”  
> env:encodingStyle=“[http://schemas.xmlsoap.org/soap/encoding/](http://schemas.xmlsoap.org/soap/encoding/)”\>  
> one  
> two  
> three  
> four  
>   
> five  
>   
> six  
>   
> seven  
>   
> \</n1:getBPList\>  
> \</env:Body\>  
> \</env:Envelope\>
> 
> I don’t know if the SOAP standard allows for those names to start  
> with capitals, but for sure the ruby code doesn’t handle it correctly.
> 
> I imagine the right way to fix this is to check the SOAP standard to  
> see what it says (or if it’s mute on the topic of capitalization) and  
> then, depending on that answer, modify the SOAP library to downcase  
> these strings or just the first letter.
> 
> Anyway, mystery solved!
> 
> cr

CR,  
Terrific! I had briefly wondered if that was causing the issue but  
thank you for checking it for me. I will continue pursue the issue by  
verifying the SOAP standard and if it is supposedly case-insensitive  
I’ll open a ticket with ‘soap4r’.

Again thank you very much.

Chris

p.s. Incidentally I have another solution which I just completed before  
checking the forum here. It simply involves not using the WSDLDriver  
and instead just using ‘soap/driver’ which I believe is the RPC driver.  
I’ve attached that code for completeness.

#!/usr/bin/env ruby

require ‘soap/driver’

wsdl\_url = “[http://usint.skire.com/ws/services/mainservice?WSDL](http://usint.skire.com/ws/services/mainservice?WSDL)”  
namespace = “[http://general.service.webservices.messenger.skire.com](http://general.service.webservices.messenger.skire.com)”

soap = SOAP::Driver.new(nil, nil, namespace, wsdl\_url)

soap.wiredump\_file\_base=“soapresult”

soap.addMethodWithSOAPAction(‘getBPList’, namespace, “shortName”,  
“authCode”, “projectNumber”, “bpName”, “nil”, “nil”, “nil”)

result = soap.getBPList(“one”, “two”, “three”, “four”, ‘’, ‘’, ‘’)

puts result.xmlcontents

---

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [July 17, 2006, 1:23pm UTC](https://www.ruby-forum.com/t/web-services-issue/62162/6 "2006-07-17T13:23:15Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi,

chris Johansen wrote:

> To finalize and clarify as I followed up on the sensitivity issue I  
> considered the standard for XML which is case sensitive. As the SOAP  
> standard doesn’t mention case-sensitivity but is based on the XML  
> standard we can assume it is transitive. As such, by section 4.3.3 of  
> the XML 1.3 standard [Extensible Markup Language (XML) 1.0 (Third Edition)](http://www.w3.org/TR/2004/REC-xml-20040204/) case  
> sensitivity should be respected.
> 
> It appears that the WSDLDriver is not adhering to this. I will open  
> a ticket with ‘soap4r’.

Thanks. I tried to download WSDL at  
[http://usint.skire.com/ws/services/mainservice?WSDL](http://usint.skire.com/ws/services/mainservice?WSDL) but browser  
complains. Can you please send me a WSDL by e-mail? I want to  
reproduce the problem on my side to fix the problem.

Regards,  
// NaHi

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRLtyMh9L2jg5EEGlAQKvOAf/XkMNp4lr469uDPCvPLHLbdbEBTzsvEzL  
WRHr/FoM3pKtwFCbh7pi5Lpux7bxrPXZHadGOsNwqIeuK7sJjU1JcrPynXOQ7xxY  
EAN3Y8gwr2jH20OKlxO1sc+zE19gFPITzuJmY0Xa7ZP/oRIuKAmE6WoJt/5jdKDV  
d4GtF/kf2Q59L1QrJGRbmCH9GyFMso7+DlV+dsf+d1chMO1oJOV+a+k5N1THbvqO  
X20Xe7lUL8s3Zjti8iJRiXmJ9R0Owe6KrFjtRhUtJ43vk9PH0WzojxShWOyBJLzR  
jpPdU65oAr2X7GGakZ2x/FCxxaNtIMvrCTmWRo4EeYs0cQ2L8UAgeA==  
=AfCo  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![cpher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/2bfe46/32.png) [@cpher](https://www.ruby-forum.com/u/cpher)\
**Post date:** [June 1, 2006, 9:45pm UTC](https://www.ruby-forum.com/t/web-services-issue/62162/7 "2006-06-01T21:45:50Z")

</div>

All,  
To finalize and clarify as I followed up on the sensitivity issue I  
considered the standard for XML which is case sensitive. As the SOAP  
standard doesn’t mention case-sensitivity but is based on the XML  
standard we can assume it is transitive. As such, by section 4.3.3 of  
the XML 1.3 standard [Extensible Markup Language (XML) 1.0 (Third Edition)](http://www.w3.org/TR/2004/REC-xml-20040204/) case  
sensitivity should be respected.

It appears that the WSDLDriver is not adhering to this. I will open  
a ticket with ‘soap4r’.

Thank you all.  
Chris.
