Platform SDK: Team Productivity Update

Calling AIM from Active Server Pages

You can call Active Server Pages (.asp) files to achieve the same functionality that the TeamAppManager object provides. This eliminates the need to create and install a proxy stub on a remote requesting computer. These .asp files take the same parameters as the TeamAppManager methods but obtain them as data transferred using the HTTP POST method.

Methods called from .asp files return Results and Descriptions using XML as follows:

RegisterAppFactory

<?xml version="1.0" ?>
<TeamAppFactory>
<ID> {25024FE7-1515-11d3-98DF-00C04F79ED3C} </ID>
<Result>
<Code> 0 </Code>
<Description> Succeeded! </Description>
</Result>
</TeamAppFactory>

The <ID> tag contains the FactoryID normally returned by the RegisterAppFactory method. The <Result> tag contains the basic success (0 or positive) or failure (negative) of the call and an associated description of the result.

UnregisterAppFactory

<?xml version="1.0" ?>
<TeamAppFactory>
<Result>
<Code> 0 </Code>
<Description> Succeeded! </Description>
</Result>
</TeamAppFactory>

FriendlyNameFromGUID

<?xml version="1.0" ?>
<TeamAppFactory>
<Name> AppFactoryName </Name>
<Result>
<Code> 0 </Code>
<Description> Succeeded! </Description>
</Result>
</TeamAppFactory>

The following code demonstrates how to call the TeamAppManager methods from .asp files:

Sample code to call RegisterAppFactory.asp

<HTML>
<HEAD>
</HEAD>
<BODY>
<form action=http://<servername>/tptkweb1/RegisterAppFactory.asp
method="post" name=RegAppForm>
    <input type="hidden" value="http://<servername>/xmlnohtml.asp" name="Instantiate" >
    <input type="hidden" value="Testing web regapp" name="FriendlyName" >
    <input type="hidden" value="2" name="Type" >
    <input type="hidden" value="Testing" name="Description" >
</form>
<script>
function window.onload()
{
    RegAppForm.submit();
    
}
</script>
</BODY>
</HTML>

Sample code to call UnregisterAppFactory.asp

<HTML>
<HEAD>
</HEAD>
<BODY>
<form action=http://<servername>/tptkweb1/UnregisterAppFactory.asp
method="post" name=UnRegAppForm>
    <input type="hidden" value= "{25024F7C-1515-11d3-98DF-00C04F79ED3C}" name="FactoryID" >
</form>
<script>
function window.onload()
{
    UnRegAppForm.submit();
}
</script>
</BODY>
</HTML>

Sample code to call FriendlyNameFromGUID.asp

<HTML>
<HEAD>
</HEAD>
<BODY>
<form action=http://<servername>/tptkweb1/FriendlyNameFromGUID.asp
method="post" name=GetNameForm>
    <input type="hidden" value= "{25024FC0-1515-11d3-98DF-00C04F79ED3C}" name="GUID" >
</form>
<script>
function window.onload()
{
    GetNameForm.submit();
}
</script>
</BODY>
</HTML>