Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi, I'm prety new to EPi CMS. I have a legacy application to support which was designed to work on EPi 7. It has a webservice, codebehind is a C# class. The class has methods such as getChildPage, getVPP etc. I am aware of the shift of EPi's webservices to REST API and the fact that the webservices is officially gone after 8 onwards. Now my need is to work that out with a new instance of EPi 8.10. I added a webservice folder manually(root IIS), an asmx file inside and a dll. It works fine with 7.0, is there any tweaks that I can do to make it compatible to work with EPi8 and onwards? Please help, thanks in advance.
Reference:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://episerver.com/episerversample/webservices/GetChildPage", RequestNamespace="http://episerver.com/episerversample/webservices/", ResponseNamespace="http://episerver.com/episerversample/webservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string[] GetChildPage(string PageId) {
object[] results = this.Invoke("GetChildPage", new object[] {
PageId});
return ((string[])(results[0]));
}
class file:
[WebMethod(Description = "Get child page list")] GetChildPage(string PageId) ChildPageList = new List();
public List
{
List
var PageList = EPiServer.DataFactory.Instance.GetChildren(new PageReference(PageId), LanguageSelector.AutoDetect(true));
foreach (var page in PageList)
{
ChildPageList.Add(page.ContentLink.ID + "," + page.Name);
}
return ChildPageList;
}