Привет всем,
если кто работал с веб сервисами...
Столкнулся с такой проблемой.
Есть простой сервис (asmx файл), который получает переменную в формате DateTime и возвращает ее же в таком же формате DateTime.
Так вот флеш этого почему то сделать не может...
Все перепробовал...
Сорс сервиса test.asmx

Код:
<%@ WebService Language="c#" debug="true" class="Test" %>
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.Services;
public class Test: System.Web.Services.WebService
{
[WebMethod(Description="Date string")]
public DateTime getDateVar(DateTime sentNum) {
return sentNum;
}
}
сама флешка:

Код:
import mx.services.*;
//create the listener object
var clickListen:Object = new Object();
//add the event to the listener
clickListen.click = function() {
//create an object to listen for when the WebServiceConnector receives data
var rateServices = new WebService("http://localhost/test.asmx?WSDL", rateServiceLog);
// Call the doCompanyInfo method and assign it to the pending call object to handle results.
RateResultObj = rateServices.getDateVar("2004-04-15 12:00:00");
rateServices.onLoad = trace("loading");
rateServices.onLoad = trace(date_str);
// the onResult function is called if the service is successful
RateResultObj.onResult = function(result) {
// example result values. The result is a decoded actionscript object
// version of the xml returned by the operation.
// In this case the result is a object with company, lastPrice etc being properties.
trace("Date: "+result);
};
RateResultObj.onFault = function(fault) {
// If there is any error such as the service not working, the onFault handler will be invoked.
trace(fault.faultCode+","+fault.faultstring);
};
};
//finally add the event listener to the button
square_pb.addEventListener("click", clickListen);
// Creates a Log object which records all events when calling a web service.
rateServiceLog = new Log(Log.VERBOSE);
rateServiceLog.onLog = function(txt) {
trace(txt);
};
все в одном фрейме и кнопка с именем square_pb
У кого получится вывести DateTime очень буду благодарен!
Спасибо заранее !