Response.Write("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
        Response.Write("<user>");
        Response.Write("<userName>" + userName + "</userName>");
        Response.Write("<age>" + age + "</age>");
        Response.Write("<sex>" + sex + "</sex>");
        Response.Write("<hight>" + hight + "</hight>");
        Response.Write("<weight>" + weight + "</weight>");
        Response.Write("<address>" + address + "</address>");
        Response.Write("<job>" + job + "</job>");
        Response.Write("</user>");

 

以上是.net 的输出结果,使用flex HTTPService接收

flex中发送请求:

 private function getUserInfo():void
 {
  httpser2.url="http://localhost:8888/hy/GetUserInfoFromServer.aspx";
  var params:URLVariables = new URLVariables();
  params.userName = httpEncoding(userName);
  httpser2.send(params);
 }

 

<mx:HTTPService >

private function httpHandle2(e:ResultEvent):void //执行<mx:HTTPService>组件后的处理函数
{
 
    var userNames:XML = e.result as XML;
    Alert.show(userNames.userName);

}

相关文章:

  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
  • 2021-07-18
  • 2021-12-09
  • 2022-12-23
  • 2023-01-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-17
  • 2021-06-17
  • 2021-04-14
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
相关资源
相似解决方案