# About getting webservice from other website

**URL:** <https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929>\
**Category:** Rails\
**Created:** [April 16, 2008, 9:32am UTC](https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929 "2008-04-16T09:32:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daociyiyou](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/0ea827/32.png) [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Post date:** [April 16, 2008, 9:32am UTC](https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929/1 "2008-04-16T09:32:10Z")

</div>

I have a webservice offered by a website to be integrated for my  
website.They ask me to follow three steps to finish integrating.These  
steps are:

1. Create an HTTP connection.
2. Send request parameters via POST method.
3. Parse XML-formatted response string.

The request parameters are something like following:  
“Version=2.0.0.0” +  
“&ShipmentID=1234” +  
“&QueryID=YourQueryCode” +  
“&Username=YourUsername” +  
“&Password=YourPassword” +  
“&TotalCarriers=1” +  
“&CarrierCode1=USP” +  
“&CarrierAccount1=” +…  
But what i have learned from book is:client gets webservice api to use  
from some website.So how do i follow those three steps to integrate the  
webservice?  
They also have an exmaple on integration in other languages.I have put  
it in the attachment.

---

<div class="post-metadata">

**Author:** ![daociyiyou](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/0ea827/32.png) [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Post date:** [April 16, 2008, 9:45am UTC](https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929/2 "2008-04-16T09:45:49Z")

</div>

What you have received is basically a API - information about how to  
make the request (HTTP POST parameters) and how to interpret the result  
(XML structure).

Take a look at the following URL on how to make the request from Ruby:  
[http://developer.yahoo.com/ruby/ruby-rest.html#post](http://developer.yahoo.com/ruby/ruby-rest.html#post)

Information on how to parse XML can be found here:  
[http://developer.yahoo.com/ruby/ruby-xml.html](http://developer.yahoo.com/ruby/ruby-xml.html)

---

<div class="post-metadata">

**Author:** ![daociyiyou](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/0ea827/32.png) [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Post date:** [April 16, 2008, 11:20am UTC](https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929/3 "2008-04-16T11:20:29Z")

</div>

Thank you for your remind.
