Wsdl2ruby help

Hello -

I’ve been trying to figure out if and what I need to modify to get
Ruby to access these web services. In lieu of those of us who would
much rather see code than listen to someone rant about their problem,
I provided a simplified version of the WSDLs I am using.

My question is below the WSDL definitions~

Security WSDL

<?xml version="1.0" encoding="utf-8"?>



<s:schema elementFormDefault=“qualified” targetNamespace=“http://
randomsite.com”>
<s:element name=“Login”>
<s:complexType>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“usrLogin”
type=“s:string” />
<s:element minOccurs=“0” maxOccurs=“1” name=“usrPassword”
type=“s:string” />
</s:sequence>
</s:complexType>
</s:element>
<s:element name=“LoginResponse”>
<s:complexType>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“token”
type=“s:string” />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>









Login to web service.





<soap:binding transport=“http://schemas.xmlsoap.org/soap/http” />

<soap:operation soapAction=“randomsite.com
style=“document” />

<soap:body use=“literal” />


<soap:body use=“literal” />





<soap:address location=“https://randomsite.com/security.asmx” />


Contact WSDL

<?xml version="1.0" encoding="utf-8"?>



<s:schema elementFormDefault=“qualified” targetNamespace=“http://
randomsite.com”>
<s:import namespace=“http://www.w3.org/2001/XMLSchema” />
<s:element name=“GetContacts”>
<s:complexType>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“bogusName”
type=“s:string” />
</s:sequence>
</s:complexType>
</s:element>
<s:element name=“GetContactsResponse”>
<s:complexType>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1”
name=“GetContactsResult”>
<s:complexType>
<s:sequence>
<s:element ref=“s:schema” />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name=“Authentication” type=“s0:Authentication” />
<s:complexType name=“Authentication”>
<s:sequence>
<s:element minOccurs=“0” maxOccurs=“1” name=“token”
type=“s:string” />
</s:sequence>
</s:complexType>
</s:schema>












Retrieves contact information.





<soap:binding transport=“http://schemas.xmlsoap.org/soap/http” />

<soap:operation soapAction=“randomsite.com
GetContacts” style=“document” />

<soap:body use=“literal” />
<soap:header d5p1:required=“true”
message=“s0:GetContactsAuthentication” part=“Authentication”
use=“literal” xmlns:d5p1=“http://schemas.xmlsoap.org/wsdl/” />


<soap:body use=“literal” />





<soap:address location=“https://randomsite.com/contact.asmx” />


I downloaded the most recent (that I know of) gem of soap4r (1.5.7)
and httpclient (2.1.0.90.20070807) and used wsdl2ruby on both WSDLs.
I tested the security objects and everything worked great, no problems
whatsoever. When I tried to test the contact objects however there
was no mechanism to pass in the authentication value. As defined in
the Contact WSDL, the authentication token must be provided via the
SOAP header but it seems wsdl2ruby did not parse that out.

Do I need to doctor up the WSDL in order for wsdl2ruby to parse it
correctly or is this functionality not available at this time? If
it’s not, do you have any idea where the best place to start would
be. I was diving into the SOAP::RPC::Driver and SOAP::RPC::Proxy
classes but I wasn’t sure where to start.

Thanks in advance.

Regards,

Kelsen