the webservice plugin offers a simple sql query execution interface (once you uncomment it) to allow remote extraction of data. curious if any thought has gone into how interfaces could be added for returning business object level data instead of plain datasets? Seems to break a lot of interfaces to allow a module to just execute any desired query...
I'd like to add something like a specific "GetOrders(OrderStatusFilter, maxrecords)" type of interface, which should be served well by using the existing business objects (and reduce risks), but not sure what the best route for serializing them for the webservice would be.
ok. i just see all the headache of keeping the current BO with mapping to the model objects, then to have to do this all over again for a webservice, sheesh. I'll dig into it a bit more, thanks.
Dear all I added the [Serializable] in the product class Nop.Core.Domain.Catalog.Product class as well as in Nop.Core.Baseentity class I also added the [NonSerialized] in the fields of product class that I didn't want to be serialised. And i tried to get a particular product from my client by extending web services and use a method like
public Product GetProductCollection(string usernameOrEmail, string userPassword) { CheckAccess(usernameOrEmail, userPassword); if (!_permissionSettings.Authorize(StandardPermissionProvider.ManageCatalog)) throw new ApplicationException("Not allowed to manage Catalog");
return _productService.GetProductById(25);
}
But it always fails with http error. Any help?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Vous avez encore des questions ou avez besoin d'aide?