Dec 20, 2012 at 1:34 PM
Edited Dec 21, 2012 at 11:29 AM
I have a requirement to call data from an external WCF service in my Orchard module.
My services are running as a console application on my local machine with the address as:
And in here I have an interface called IWiGeneralService which contains an operation contract called:
List GetJobs(ServiceRequest request)
The methods will be called and passed with a ServiceRequest class containing authorization credentials such as UserLogon, Date, Guid, Username, Password.
I have a Module that stores the credentials for the services as Site wide settings. The credentials are the username, password, guid and services path. Similar to the (Magelia Webstore Module).
I have a widget on the homepage that shows a list of the people (the data that is returned from GetJobs).
The driver for this widget calls the service by injection passing in the settings for the part and the site settings.
List<Job> GetJobsByType(JobsByTypeWidgetPart part, SettingsPart settings);
What I need to do now is call my services from within my Orchard Module and return the data to the widgets model.
Has anyone got any pointers or example modules to follow in order to do this within an Orchard Module.
If the code example is not clear then I can clarify.