Sdk.Soap.js Action Message Generator

This project depends on the Sdk.Soap.js library included in the Sdk.Soap.js project. Define actions in the web application. Use this Sdk.Soap Action Message Generator to generate request and response classes you can use in your code to call the action using JavaScript.

C# (279.3 KB)
4 Star
2,066 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Cross-browser functionality
    2 Posts | Last post May 23, 2014
    • I notice that the example generated code uses "selectSingleNode", without branching logic for XML traversal in browsers other than Internet Explorer.  Does this library support browsers other than Internet Explorer?
    • David -
      Yes, it supports all browsers supported by Microsoft CRM. When you see selectSingleNode it should be referencing the Sdk.Xml.selectSingleNode function which includes feature detection to use IE's selectSingleNode function if present, otherwise it uses XPathEvaluator used by other browsers.
      The following code is from the Sdk.Soap.vsdoc.js library:
      this.selectSingleNode = function (node, xPath) { 
        /// Returns the node from the node as defined by the xPath 
        ///<param name="node" type="Object" optional='false'> 
        /// <para>The Xml Document or Node containing the node</para> 
        ///<param name="xPath" type="String" optional='false'> 
        /// <para>The XPath expression specifying the node</para> 
        if (typeof (node.selectSingleNode) != "undefined") { 
         return node.selectSingleNode(xPath); 
        else { 
         var xpe = new XPathEvaluator(); 
         var xPathNode = xpe.evaluate(xPath, node, Sdk.Xml.NSResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null); 
         return (xPathNode != null) ? xPathNode.singleNodeValue : null;