As part of trying to use Webforms.MVP with Ektron, I have created a DLL that contains my business logic, which is referenced by the Ektron site. However, this DLL needs to access the Ektron webservice, in order to get/update content and members.
Note: wsdl and csc are part of the .Net SDK. You will need to have this installed. Once installed, you can access them via the SDK Cmd Shell, or, if your path is correctly configured, via cmd.exe.
- Create a proxy object for the web service
- Run .Net tool wsdl.exe against your webservice address, e.g. http://localhost:/Workarea/webservices/ContentWS.asmx
- Compile into DLL by running “csc /t:library ContentWS.cs”
- Add the DLL as a reference to your DLL or console app
- Copy the DLL to a Lib folder in your project
- Right click “Add reference” and browse to your created proxy DLL.
- Add System.Web.Services as a reference to your DLL or console app
- Call the proxy DLL from the code
ContentWS cApi = new ContentWS();
ShowContentResult response = cApi.GetContentBlock(contentId);
That’s enough if your DLL or console app needs access. However, if, like me, you wish to have your Ektron site reference your DLL (in my case, for testability via Webforms.MVP) then you get a DLL conflict. The next post will be on how to overcome this.