Create Your Own Custom API - Developing the basic API layout
(Page 2 of 6 )
First off, we need to draw up a simple plan that will outline a basic XML request. This doesn't have to be set in stone but you need to have something to start out with so the client can send a request and the server can reply to that request. Our basic XML message is going to be as follows (keepin' it simple):
<?xml version="1.0"?> <myXML> <function>order</function> <values> <orderID>12345</orderID> <reference>ref</reference> </values> </myXML> |
Very simple indeed. You may also consider writing a DTD to help sort things out.
Well, there it is! We've set up our simple XML message - now we can lay out our API to match. *Note: When developing this stage of the "game", write out an XML message of what you would want a client or whoever would be using your web service and API to send as a request. This will give you an idea of how to build your server.
Next step - build the Client to send this request
Next: The Client >>
More Miscellaneous Articles
More By Codewalkers