Quote:
Originally Posted by Belikewater
I was charged with the task of running some API calls at my job, but the problem is I am just learning about this and I need to get this set up by Tuesday.
|
If your paid job has responsibilites for which you are not qualified, perhaps you should discuss that with your employer. Please understand that everyone here volunteers their time, so the urgency is all on your end.
That said, what you will need to know to complete the task is basic XML and knowledge of how WSDL and SOAP work.
First, you may think of XML as the basic syntax of the language - how things are expressed. Any XML document will consist of elements, attributes and data, something like this...
Code:
<element_name attribute="attribute value">
<nested_element>content data</nested_element>
</element_name>
XML provides the means of structuring arbitrary data in a way that can be parsed and validated according to some schema. The actual structure, or allowed elements and attributes are defined by the schema document, itself written in XML. In other words, the schema defines a valid document for that web service.
You should first gain a basic knowledge of XML by doing an online search for tutorials - there are many,
here is one.
Next, WSDL, or Web Service Description Language is a specification of an XML document, or language used to describe web services. SO, to communicate with this web service you will need to understand the format of WSDL documents. Again, you may find many tutorials online,
here is one.
The schema which you linked defines the documents recognized by that particular web service.
Right at the top it describes a set of elements and attributes contained within an AccountInfo element, which is probably what you are looking for. The basic structure described there looks something like this...
Code:
<AccountInfo number="..." secret=".." country="..." language="..." behalfOf="..." />
Finally, Soap defines an XML language which serves as a kind of envelope for passing data between systems across the internet. Find many tutorials online,
here is one.
To interact with their web service you will need to create a complete WSDL document according to that schema and the desired activity, put it into a SOAP wrapper and submit it to their URL. It will then return the result, also in an XML document which you must then parse to extract the desired data.
All of this may be done in various scripting languages such as Python, PHP, Perl or others. The language used will determine the details of how the XML document (usually a simple string) is formed and how the HTTP request is performed (socket, curl, fileget, etc.).
I hope this helps get you started, good luck!
*** EDIT, or you could just use the auth tab of your application... (we were typing at the same time)