Hi i wrote webservice in .net which return json string
WebService(Namespace = "AndrewRowland")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string HelloWorld()
{
test Test = new test();
Test.a = "one";
Test.b = "two";
JavaScriptSerializer js = new JavaScriptSerializer();
return js.Serialize(Test);
}
}
and now i want to cosume this method 'HelloWorld' in Flex3 but i don't know how to ask about this metod what i done is to put corelib to my libs and wrote httpService:
:
private function onJSONLoad(event:ResultEvent):void
{
var rawData:String = String(event.result);
var manager = JSON.decode(rawData);
}
<mx:HTTPService id="service" resultFormat="text"
url="http://localhost:50174/Service1.asmxn"
result="onJSONLoad(event)" />