What is a webservice?  


What is a webservice?
Webservices can be compared to remote objects (or classes) wich canbe used over the Internet. These remote objects contain methods wich canbe used with the SOAP protocol. There are already a lot of developmentplatforms (like: MS Visual Sudio .NET, ASP.NET, Borland Delphi RIO, PocketSOAP for Visual Basic, SOAPLite for Perl, Apache Soap, etc) that can invoke these objectsinto their own environment. This means that the developer can use thatobject (class) as if it resides on their own PC. The underlying classeswill take care of the HTTP handling and SOAP messages.


What is SOAP?
SOAP means Simple Object Access Protocol. This protocol is used toexecute the remote objects (classes) methods. It is fully XML and is sentto the webservice listener. An example SOAP message can look like this:
<env:Envelope xmlns:env="http://www.w3.org/2001/06/soap-envelope">
 <env:Body>
   <m:OMS_GetUserList
    env:encodingStyle="http://www.w3.org/2001/06/soap-encoding"
        xmlns:m="http://example.org/2001/06/quotes">
      <username>test</username>
      <password>test</password>
   </m:OMS_GetUserList>
 </env:Body>
</env:Envelope>
In this message the method "OMS_GetUserlist" is called. The argumentsthat are passed are: "username" and "password".
When this SOAP message is send to the service, the reply from the webservicecould look like this:
<env:Envelope xmlns:env="http://www.w3.org/2001/06/soap-envelope">
 <env:Body>
   <m:OMS_GetUserList
        env:encodingStyle="http://www.w3.org/2001/06/soap-encoding"
        xmlns:m="http://example.org/2001/06/quotes">
    <Userlist>
        <OnlineUsers>
        </OnlineUsers>
        <OfflineUsers>
           <OfflineUser>ie</OfflineUser>
           <OfflineUser>nims</OfflineUser>
           <OfflineUser>testje</OfflineUser>
        </OfflineUsers>
        <NewMessage>false</NewMessage>
    </Userlist>
  </m:OMS_GetUserList>
</env:Body>
</env:Envelope>
How can I use the webservices?
Every webservice that is around can be described in a so called WSDLfile. This file is mostly the only thing you need to add to your Delphi,MS Visual Studio, etc. project. The evironment will then create a classfor you wich you can use inside your project. When you don't have the luxuryof an environment that supports wsdl files, you should try looking fora way of sending & receiving SOAP messages.
The WSDL file describes the webservice in full extense. It says wichwebservices are available, and says wich methods are available in thatservice. It also tells you wich arguments are passed, and what the returnvalues are. For complex structures is also a places in the WSDL file. Acomplex structure could look like this:
    <Userlist>
        <OnlineUsers>
        </OnlineUsers>
        <OfflineUsers>
           <OfflineUser>ie</OfflineUser>
           <OfflineUser>nims</OfflineUser>
           <OfflineUser>testje</OfflineUser>
        </OfflineUsers>
        <NewMessage>false</NewMessage>
    </Userlist>
How did we make these services?
All the webservices found on this site are based on a Perl librarythat implements the SOAP protocol. This library is completely built byus, and does not need any XML, http, etc. addons to work. The reason whywe built it ourself is because the ISP does not allow to install any packageson the system. And furthermore we now have  a very easy to understandlibrary that is very flexible at the soap messages it has to process. Wehave also added a feature in the library so that it wil generate SIMPLEresult types.
SIMPLE result types are given back in one XML node <Result> thatcontains a ';'-seperated  name value list. For example:
the complex result:
    <Userlist>
        <OnlineUsers>
        </OnlineUsers>
        <OfflineUsers>
           <OfflineUser>ie</OfflineUser>
           <OfflineUser>nims</OfflineUser>
           <OfflineUser>testje</OfflineUser>
        </OfflineUsers>
        <NewMessage>false</NewMessage>
    </Userlist>
will be given back as:
<Result>OfflineUser=ie;OfflineUser=nims;OfflineUser=testje;NewMessage=false;</Result>
This has been done because a lot of SOAP implementations does not yetsupport COMPLEX classes & Types.
This means that you can still use the functionality of the webserviceby just calling the simple methods.
Another feature that is built in the library is the "form, text". option.With this option enabled you can use HTML forms to send a SOAP messageto the library. The library will then process the message as if it wasa normal SOAP message from an application, BUT it wil send the result backas a normal TEXT file instead an XML file. At this way you can test yoursoap application with normal HTML Forms and a browser instead of writinga difficult SOAP implementation in an application. When you go to the testsection you can try this feature right now!
Can I use your services?
YES! All webservices we have built can be used by you! Just visit theAvailable webservices section to foundout which one are available for you.
What do I do when I have questions about the webservices?
Just ask them! We have a mailbox available at soap@nims.nlat wich you can ask the questions related to the webservices we provide.We do not claim to be a Webservices or SOAP guru, and don't even know anythingabout all the different Delevelopment platforms. So please don't send questionsrelated to those subjects into our direction.


  © 2004-2005, Online Messenger Services nedstat counter