![]() |
|
|
Published: Monday, July 03, 2000 By Erick Stover You know the scenario, you need to somehow get data from your server to your customer's server and this needs to be implemented tomorrow. No problem, let's write a VB Com object that will create a constant link to the customer's server through Port 1452 and anytime our database is updated it will transmit the data across! No, wait. There's no way I can implement that by tomorrow. Plus, opening that port on our firewall will completely invalidate our network security guidelines. Ok, We can just send them weekly backups! Yeah, right.
Well, what do I have left? The answer was like a shining ray of light from the heaven's above: SOAP! SOAP, the Simple Object Access Protocol, is the newest toy to come from the World Wide Web Consortium and Microsoft. Based on XML, it allows the transfer of data through the HTTP headers. This means you can conduct all you transfers on port 80, therefore preventing the opening of any security holes on your server. How is it done? Simple. In its basic form, SOAP consists of two files: Client and Server, and its dependant on the XMLDOM and XMLHTTP objects. Lets build a client, shall we? You want to start off by setting up your objects.
(I think it should be noted that the objects will only exists on your server if IE5 has been installed. Talk to your sysadmin if you're not sure.) I use a constant to tell it where the SOAP server is located.
I then create a function that will build the request XML. You can pretty much put this anyway you like. In this case, I have a "password" and a question.
Keep in mind that when making your SOAP XML, there are some required fields. Without the
In order to make use of the SOAP, you also need to have certain lines in your header. I use the XMLHTTP object to set those up.
The first line tells the object that you want to open a POST connection to the SOAP server mentioned above and that I don't want it to return immediately (the default value for this is true). On the second line. I am just setting up a basic POST header. The third line lets the server know that this page is expecting info to be returned. The forth line is obvious and very required. Finally, we tell it to send the request XML.
The SOAP server (specified by the
Finally, do a little cleaning.
You now have a basic SOAP client! Now the fun part: The Server (insert scary music here...)! In Part 2 we'll look at building the server. This server will be responsible for responding to requests from SOAP clients.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||