# Can't connect to BPEL web service from cucumber using savon

**URL:** <https://rubytalk.org/t/cant-connect-to-bpel-web-service-from-cucumber-using-savon/61935>\
**Category:** ruby-talk\
**Created:** [24 February 2011 18:48 UTC](https://rubytalk.org/t/cant-connect-to-bpel-web-service-from-cucumber-using-savon/61935 "2011-02-24T18:48:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moon\_Chy](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Moon\_Chy](https://rubytalk.org/u/Moon_Chy)\
**Post date:** [24 February 2011 18:48 UTC](https://rubytalk.org/t/cant-connect-to-bpel-web-service-from-cucumber-using-savon/61935/1 "2011-02-24T18:48:30Z")

</div>

Hi all,

I am trying to test a helloworld BPEL service (deployed locally on a soa  
server (weblogic)). When I try to invoke it from cucumber, I get  
following message ---

NoMethodError: undefined method `starts\_with?' for nil:NilClass  
C:/Ruby192/lib/ruby/1.9.1/rexml/parsers/streamparser.rb:24:in `parse'  
C:/Ruby192/lib/ruby/1.9.1/rexml/document.rb:204:in `parse\_stream'  
./features/support/helloWorld\_functions.rb:15:in `processHelloWorld'  
./features/step\_definitions/helloWorld\_steps.rb:8:in `/^I invoke  
HelloWorld web service$/'

FYI, I can invoke actual BPEL web-service from soapUI.

I couldn't find a solution from this error message. So, I used the same  
WSDL file and created a mock web-service using soapUI and deployed it  
locally and was able to call it from cucumber and got successful  
response.

What shall I do to fix this issue?

Thanks!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Moon\_Chy](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Moon\_Chy](https://rubytalk.org/u/Moon_Chy)\
**Post date:** [25 February 2011 17:15 UTC](https://rubytalk.org/t/cant-connect-to-bpel-web-service-from-cucumber-using-savon/61935/2 "2011-02-25T17:15:48Z")

</div>

I had to change

> **···**
>
> ----------------------  
> $client = Savon::Client.new  
> "[http://localhost:8001/soa-infra/services/default/HelloWorld/bpelprocess1\_client\_ep?WSDL](http://localhost:8001/soa-infra/services/default/HelloWorld/bpelprocess1_client_ep?WSDL)"
> 
> ----------------------
> 
> to
> 
> ----------------------  
> $client = Savon::Client.new do  
> &nbsp;&nbsp;&nbsp;&nbsp;wsdl.endpoint =  
> "localhost/soa-infra/services/default/HelloWorld/bpelprocess1\_client\_ep"  
> &nbsp;&nbsp;&nbsp;&nbsp;wsdl.namespace =  
> "[http://xmlns.oracle.com/HelloWorldSOA\_jws/HelloWorld/BPELProcess1](http://xmlns.oracle.com/HelloWorldSOA_jws/HelloWorld/BPELProcess1)"  
> &nbsp;&nbsp;end
> 
> ----------------------
> 
> to get it working.
> 
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
