Now that we have all the pieces we need, simply create a new application in MTS and add the two components or register them user regsvr32. Once this is complete we can now use our ASP interface to enter a number and retrieve our answers.
Here is what the outgoing SOAP message will look like:
<SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlSOAP.org/SOAP/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlSOAP.org/SOAP/envelope/">
<SOAP-ENV:Body>
<Functions:CalcFactorial
xmlns:Functions="uri:Math">
<Functions:Number>10</Functions:Number>
</Functions:CalcFactorial>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is the response SOAP message:
<SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlSOAP.org/SOAP/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlSOAP.org/SOAP/envelope/">
<SOAP-ENV:Body>
<Functions:CalcFactorialResponse
xmlns:Functions="uri:Math">
<Functions:Answer>3628800</Functions:Answer>
</Functions:CalcFactorialResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
As you can see this was a very simple example of a XML
Web Service application that utilizes Microsoft's SOAP Toolkit.
Although simple to implement, this article illustrates a
very exciting and powerful point: SOAP and XML Web Services
allow you to make remote calls to objects. This technology
allows you to provide rich business functionality across
a distributed environment without requiring a programming
language upgrade. Even though .NET is an exciting and powerful
tool, if your environment isn't ready for the jump, you
don't have to be left in the cold.
About the Author
Jim Milam is a .NET Certified Application Developer and works for Cardinal Solutions (http://www.cardinalsolutions.com) in Cincinnati, OH. Cardinal Solutions provides eBusiness solutions to Fortune 1000 companies in a variety of industries including medical, manufacturing, insurance, engineering, financial services, banking, consumer retail, telecommunications and aerospace. |