0

I have this webservice

   [WebService(Namespace = "http://localhost/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

[ScriptService]
[System.ComponentModel.ToolboxItem(false)]
public class CompanyData : WebService
{   [WebMethod]
    public String HelloWorld()
    {

        return "Hello JSON";

  }
}

in the same directory i have an edge generated HTML File

In the scene, there is a button with this code onClick

$.ajax({
    type: "POST",
    url: "CompanyData.asmx/HelloWorld",    
    data: "{}",    
    contentType: "application/json; charset=utf-8",
    dataType: 'json',  
    success: function(response) 
    {
        //get the value of a Symbol variable

        //sym.getComposition().getStage().sym.getSymbol("feedback").html(response.d);
        this.play();

    },
failure: function(msg) 
{
    sym.getComposition().getStage().sym.getSymbol("feedback").html(msg);
},

 error:function (request, status, error) 
 {

}
});

The success function does not get reached. I can't figure out why. Tried variations of the code, read other examples - still not working.

I have used the error and failure

What am i doing wrong ? Both pages are on IIS 7 on localhost

Thanks in advance

Charles
  • 50,943
  • 13
  • 104
  • 142
d4c0d312
  • 748
  • 8
  • 24

1 Answers1

0

I figured it out. The problem was not that the data returned was not triggering the success function - it was. The problem was with my rubbish Adobe Edge script syntax .

d4c0d312
  • 748
  • 8
  • 24