Creating Web Service

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 anos atrás
Hi,

I want to create a web service on top of nopcommerce that provide many functionality for another website (for some integration).
The problem is when I add a project for web service, it cannot access to service layer (for example OrderService). I guess I should add some code to DependencyRegistrar class to use web service like controllers (that gets service objects in constuctor).
But I don't know how sould I do this. Some problems are:

1. How should I set its namespace to integrate with all other projects in solution?
2. How should I register web service project in DependencyRegistrar to get the service objects in its constructor?

Thanks in advance
12 anos atrás
1.  Your choice.  You can use your own namespace but you just need to have the right using statements at the top of your class or include the nop namespaces before every type.

2.  I'm not sure on this but give it a shot:

builder.RegisterType(typeof(B));


where B is your web service class name.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.