
Originally Posted by
adun
Me, too.
Is there any one that answers questions?
Spring.net can't do it..
i did this way:
normal webservice and used Spring.Context.Support.ContextRegistry.GetContext( ).GetObject("service"); to load spring service.
Code:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class JSonService:WebService
{
private IDataService _dataService;
public IDataService DataService
{
get
{
if (_dataService==null)
{
_dataService = (IDataService) ContextRegistry.GetContext().GetObject("DataService");
}
return _dataService;
}
}
[WebMethod]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json, XmlSerializeString = false)]
public List<DataItem> GetAutocomplete(string q)
{
return DataService.GetAutocomplete(q);
}
}
using it without problems for almost six months.
anyway Spring really SHOULD BE ABLE to return JSON