2013-04-25 58 views
-1

我想要使用EPIServer Webservice獲取動態屬性。看到我能做的唯一的事情就是創建新的屬性使用我如何使用EPIServer webservice獲取動態屬性

PageStoreService.RawProperty dynProperty = new PageStoreService.RawProperty(); 
dynProperty.IsDynamicProperty = true; 

但我不知道如何獲得一個屬性。我的問題是這個。 什麼是正確的方式做

DynamicProperty dynProperty = DynamicProperty.Load(therootnode, "MyDynamicProp"); 

使用EPIServer web服務? 在此先感謝!

回答

1

this非常相似的問題。你可以推出自己的服務以獲取此信息

[WebService(Namespace=http://yournamespace/")] 
public class PageReferenceService : System.Web.Services.WebService 
{ 
    [WebMethod()] 
    public PageReference GetDynamicProperty(PageReference rootNode, string propertyName) 
    { 
     return DynamicProperty.Load(rootNode, propertyName); 
    } 
} 

(未經測試)

+0

嗨,這是類似的,因爲我問了兩個問題在同一時間:) – Andreas 2013-04-25 09:41:11

+0

其實你可以看一下擴展PageStoreService所以你止跌沒有額外的代碼來調用兩個不同的服務 – tompipe 2013-04-25 09:43:36