0
votes

I'm new in learning Web services.

I was trying to use soap services to get a city weather from a website.

Here is the website

http://www.bom.gov.au/australia/majorcities.shtml?ref=hdr

I want to get the weather of Broome City on Friday.

While articulating my self doing this I came across two terms: EndPoint and SOAP Action

Can anyone please help me to understand these two terms ?

Is EndPoint is the URL from where I want to get information ?

SOAP Action ? What's this, why we use this and how we can use this ?

The only thing I know about SOAP services is It sends the request in xml format to server and response also comes up in xml format.(Might be am wrong)

Thanks in Advance !! :)

1

1 Answers

0
votes

If you are starting fresh on web-services, I would recommend building REST service instead of soap service. That would be easier to start with. If you go for REST service, your url would be:

http://serverxyz.com/{city}/{day}

Coming back to your questions:

EndPoint is the URL from where I want to get information ? - Correct


One web service usually has many operations which are called soap action/soap method. Here is sample SOAP request from w3school which is also called SOAP envelope:

<?xml version="1.0"?>

<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">

<soap:Body>
  <m:GetPrice xmlns:m="http://www.w3schools.com/prices">
    <m:Item>Apples</m:Item>
  </m:GetPrice>
</soap:Body>

</soap:Envelope>