Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you can create a class just as the following :</p> <pre><code>using System.Diagnostics; using System.Xml.Serialization; using System; using System.Web.Services.Protocols; using System.Web.Services; using System.Net; [System.Web.Services.WebServiceBindingAttribute( Name = "FunctionName", Namespace = "nameSpace")] public class ClassName: System.Web.Services.Protocols.SoapHttpClientProtocol { public ClassName(string uri) // Constractor { this.Url = uri; // the full path for your server we will make later on in the answer } [System.Web.Services.Protocols.SoapDocumentMethodAttribute( "nameSpace/ClassName", RequestNamespace = "nameSpace", ResponseNamespace = "nameSpace", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public object[] FunctionName(string Parameter1) { object[] results = { }; try { results = this.Invoke("FunctionName", new object[] { Parameter1}); return ((object[])(results[0])); } catch (Exception error) { object[] webException = { -1, error.Message }; return (webException); } } } </code></pre> <p>and now we create the asmx service:</p> <p>create a web service and add this under the namespace :</p> <pre><code>[WebService(Namespace = "NameSpace")] //same namespace you wrote in the class </code></pre> <p>then add your function and Object[] as returning value.</p> <pre><code>[WebMethod] public object[] FunctionName(string Parameter1) // function name and parameters should be the same in your class where you called the web service (case sensitive) { ... // your code } </code></pre> <p>** you can download <a href="http://www.fiddler2.com/fiddler2/version.asp" rel="nofollow">http://www.fiddler2.com/fiddler2/version.asp</a> that will allow you to see and trace the out going requests</p> <p>please send me back if you need any farther info.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload