ATLAS Call Remote .NET Web Service

M

Marshall

Hello,

I am wondering if it is possible to call a remote web service using ATLAS
and if so, how. I have read several docs which show how to call a web
service that is within the same project as the ATLAS 'enabled' web page but
that is all I have found.

In the example below, I would like to call the
OpenOnline.SaveToPDF.WebServices.Service web service. I get a javascript
error when trying to make the web service call saying that OpenOnline was
undefined.

Thank you for your help,

Marshall

<body>

<form id="form1" runat="server">

<atlas:ScriptManager ID="ScriptManager1" runat="server">

<Services>

<atlas:ServiceReference

Path="http://localhost/OpenOnline.SaveToPDF.WebServices/Service.asmx"

Type="OpenOnline.SaveToPDF.WebServices.Service">

</atlas:ServiceReference>

</Services>

</atlas:ScriptManager>

<div>

<asp:Button ID="save" runat="server" OnClientClick="SaveToPDF()"
Text="Save to PDF" />

</div>

<script type="text/javascript">

function SaveToPDF()

{

OpenOnline.SaveToPDF.WebServices.Service.SaveHTMLToPDF('<html><body>hi</body></html>',
'marshall.pdf', OnRequestComplete);

}

</script>

</form>

<script type="text/xml-script">

<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">

<references>

</references>

<components>

</components>

</page>

</script>

</body>
 
B

bruce barker \(sqlwork.com\)

the ATLAS library does not use SOAP, so you can not call a webservice with
it. if you use firefox or safari SOAP support is builtin. for IE there is an
unsupported behavior you can install.

-- bruce (sqlwork.com)
 
S

Steve C. Orr [MVP, MCSD]

The way its done is to do an AJAX call back to your server, then your server
does the web service call to the external server.
I know this seems inefficient, but browser security generally only allows a
web page to call back to its own server, so this extra steps is necessary.

Here are the implementation details:
http://atlas.asp.net/docs/atlas/doc/bridge/default.aspx
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top