ATLAS with C# classes not WebServices

R

rogersmail

Greetings to all,

Can anyone tell me if Atlas can work directly with C# classes not
defined as a webservice.
sort of like a servlet class.


I would like to create a thin and thick client for my app. If I need
to use webservices to talk to my system for both cases, then that seems
to me to be a waste of resources. It would seem easier to create a
service layer which knows to return data as xml or string or object.

Thanks
Roger
 
B

Bruce Barker

not exatly sure your question.

ATLAS callback pages are not a SOAP webservices. their main function over
the builtin client callback support in asp.net 2.0, is to support
serialzation of data for javascript. the classes the ATLAS callback page use
can be local or a webservice.

-- bruce (sqlwork.com)
 
R

rogersmail

Sorry that the question was not clear.

I have the following

SampleTest.cs class

namespace Samples.AspNet
{
public class SampleTest
{
public String getSampleInfo(int sample_id, string type)
{
XmlDocument xmlDoc = new XmlDocument();
SampleService sample = new SampleService();
xmlDoc = sample.getSampleData(sample_id);
return xmlDoc.InnerXml.ToString();
}
}
}


called from
<script type="text/javascript" src="SampleTest.cs/js">
</script>

<script language="javascript" type="text/javascript">

function GetSamples(){

var sample_id = document.getElementById("sample_id");

Samples.AspNet.SampleTest.getSampleInfo(sample_id.value, "sample",
OnRequestComplete);
}

function OnRequestComplete(result)
{
populate html
}

Now if I create the SampleTest as a WebService, this will work
perfectly.

When I call it as a .cs file, I get a javascript error 'Samples' is not
defined

Please forgive me I am new to this.

Thanks
Roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top