# Need help with wsdl2ruby

**URL:** <https://www.ruby-forum.com/t/need-help-with-wsdl2ruby/135612>\
**Category:** Ruby\
**Created:** [April 23, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/need-help-with-wsdl2ruby/135612 "2008-04-23T16:31:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbochan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tbochan](https://www.ruby-forum.com/u/tbochan)\
**Post date:** [April 23, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/need-help-with-wsdl2ruby/135612/1 "2008-04-23T16:31:23Z")

</div>

Hi,

I have created ruby scripts using wsdl2ruby.rb (v1.5.8) from the Betfair  
service.

ruby \ruby\bin\wsdl2ruby.rb --type client --wsdl  
[https://api.betfair.com/global/v3/BFGlobalService.wsdl](https://api.betfair.com/global/v3/BFGlobalService.wsdl)

When I try to run the generated client, it fails with a “service not  
found” message,  
which then breaks the xmlparser.  
The first wiredump shows the generated XML request.

When I try to do the same thing with SOAPBITS or WEBSERVICESTUDIO, it  
works fine.

But there are some clear differences between the two XML request strings  
(note lines with “envelope” in them), and my knowledge is  
far too small to comprehend what is going on, and I’m about to give up.

Can anyone out there suggest a way that I can move forward with this  
please ?  
Is this a wsdl2ruby.rb bug or am I not doing something correctly ?

Regards,  
Tad

[https://api.betfair.com/global/v3/BFGlobalService.wsdl](https://api.betfair.com/global/v3/BFGlobalService.wsdl)

ruby BFGlobalServiceClient.rb

Wire dump:

= Request

! CONNECT TO [api.betfair.com:443](http://api.betfair.com:443)  
! CONNECTION ESTABLISHED  
POST /global/v3/BFGlobalService.wsdl HTTP/1.1

SOAPAction: “login”

Content-Type: text/xml; charset=utf-8

User-Agent: SOAP4R/1.5.8 (/187, ruby 1.8.6 (2007-03-13) [i386-mswin32])

Date: Wed, 23 Apr 2008 10:44:07 GMT

Content-Length: 460

Host: [api.betfair.com](http://api.betfair.com)

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

\<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:login  
xmlns:n1=“[http://www.betfair.com/publicapi/v3/BFGlobalService/](http://www.betfair.com/publicapi/v3/BFGlobalService/)”\>  
xxxxxxxx  
xxxxxxxx  
82  
\</n1:login\>  
\</env:Body\>  
\</env:Envelope\>

= Response

HTTP/1.1 500 service not found

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch\_4\_0  
date=200610162339)/Tomcat-5.5

Content-Type: text/html;charset=utf-8

Content-Length: 1051

Date: Wed, 23 Apr 2008 10:43:31 GMT

nnCoection: close

SOAPBITS : (This works ok)

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

\<soap:Envelope xmlns:soap=“[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)”  
xmlns:xsd=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)”\>  
soap:Body  
  
  
  
0  
xxxxxxxx  
82  
xxxxxxxx  
0  
  
  
\</soap:Body\>  
\</soap:Envelope\>
