From: chris Johansen
Date: 2006-06-02T04:38:38+09:00
Subject: Re: Web Services Issue
>
> 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:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 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:
>
> xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
> env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> one
> two
> three
> four
> xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="n2:Array">
> - five
>
> six
> xsi:type="n3:Array"
> n3:arrayType="xsd:string[1]">
> - seven
>
>
>
>
>
> 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"
namespace = "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
--
Posted via http://www.ruby-forum.com/.