User Tools

Site Tools


web-integration:c-sharp-example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
web-integration:c-sharp-example [2019/08/05 11:23]
tjotov
web-integration:c-sharp-example [2019/08/05 11:27] (current)
tjotov
Line 2: Line 2:
 C# relies on Web services for ADUCID - or WSA, see [[web-integration:basics|Server side integration basics]] C# relies on Web services for ADUCID - or WSA, see [[web-integration:basics|Server side integration basics]]
  
-=== Import WSDL into your project in Visual Studio. ===+Import WSDL into your project in Visual Studio.
  
 Create an instance of **AducidApiJsonServiceClient**. Create an instance of **AducidApiJsonServiceClient**.
Line 56: Line 56:
 Just simple "Rewrite" from WSA to C# with authId check Just simple "Rewrite" from WSA to C# with authId check
 <sxh csharp> <sxh csharp>
-//We have to "proxy" AIM reponses to Web APIuising this page+            //We have to "proxy" AIM reponses to Web APIuising this page
             var aducid = new AducidApiServiceClient();             var aducid = new AducidApiServiceClient();
             context.Response.ContentType = "application/json";             context.Response.ContentType = "application/json";
Line 89: Line 89:
  
 <sxh csharp> <sxh csharp>
-var aducid = new AducidApiServiceClient();+            var aducid = new AducidApiServiceClient();
             string query = context.Request.QueryString.ToString();             string query = context.Request.QueryString.ToString();
             var queryParsed = HttpUtility.ParseQueryString(query);             var queryParsed = HttpUtility.ParseQueryString(query);
Line 125: Line 125:
  
 === Prepare a web page === === Prepare a web page ===
-This page should contain [[integration-api:start|ADUCID Integration API]]\\+This page should contain [[web-integration:client-side|Client API for Web Integration]]\\
 Provide start, check and proxy Url. Provide start, check and proxy Url.
-<sxh>  
-   aducid.setStartOperationUrl("open"); 
-   aducid.setResultOperationUrl("openCheck"); 
-   aducid.setProxyUrl("proxy"); 
-</sxh> 
 Override what should be done after authentication / operation: Override what should be done after authentication / operation:
-<sxh>  +<sxh javascript
-   aducid.processResult = function (result) { +     <script type="text/javascript">
-                if (result.status == "OK") { +
-                    alert("atuhenticated"); +
-                    //location.reload(); +
-                } +
-                else { +
-                    alert("atuhentication failure"); +
-                } +
-            } +
-</sxh>  +
- +
-And create some HTML elements: +
- +
-<sxh html> +
-<script type="text/javascript">+
         var aducid = new ADUCID();         var aducid = new ADUCID();
  
Line 207: Line 188:
         });         });
     </script>     </script>
 +</sxh> 
  
 +And create some HTML elements:
 +
 +<sxh html>
     <div class="container">     <div class="container">
         <h1>ADUCID Hello World example</h1>         <h1>ADUCID Hello World example</h1>
web-integration/c-sharp-example.1565004233.txt.gz · Last modified: 2019/08/05 11:23 by tjotov