GUI 확장 프로그램에서 작동하도록 데이터 모델을 만들려고합니다. 문자열을 반환하는 간단한 서비스를 만들었습니다. 나는 model.config을 구성하고 내 Web.config의에 다음 항목을 추가 한 모델에서 웹 서비스를 생성하는 중 오류가 발생했습니다.
<services>
<service name="CMSExtensions.Model.Services.PublicationInfo" behaviorConfiguration="Tridion.Web.UI.ContentManager.WebServices.DeveloperBehavior">
<endpoint name="PublicationInfo" address="" behaviorConfiguration="Tridion.Web.UI.ContentManager.WebServices.AspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="Tridion.Web.UI.ContentManager.WebServices.WebHttpBindingConfig" contract="CMSExtensions.Model.Services.PublicationInfo"/>
</service>
</services>
나는 다음과 같은 오류 얻을 브라우저에서 직접이 서비스를 실행하려고
:파서 오류 메시지 :이 'Tridion.Web.UI.ContentManager.WebServices.DeveloperBehavior'
이라는 서비스 동작이 없습니다.
와 내가 GUI에서 JS를 통해 호출 할 때이 오류를 얻을 : 나는 SDL Tridion 2011 (NO SP1)을 사용하고
Uncaught TypeError: Cannot call method 'GetPublicationData' of undefined
CMSExtensions.Popups.PublicationInfo._onExecuteButtonClickedPublicationInfo_v6.0.0.39607.0_.aspx:433
(anonymous function)PublicationInfo_v6.0.0.39607.0_.aspx:2
EventRegister.f.executeListenerPublicationInfo_v6.0.0.39607.0_.aspx:16
aPublicationInfo_v6.0.0.39607.0_.aspx:16
Tridion.ObjectWithEvents.processHandlersPublicationInfo_v6.0.0.39607.0_.aspx:14
Tridion.ObjectWithEvents.fireEventPublicationInfo_v6.0.0.39607.0_.aspx:14
Tridion.Controls.Button.onclickPublicationInfo_v6.0.0.39607.0_.aspx:428
Tridion.Controls.Button.onmouseupPublicationInfo_v6.0.0.39607.0_.aspx:428
(anonymous function)PublicationInfo_v6.0.0.39607.0_.aspx:2
EventRegister.f.executeListenerPublicationInfo_v6.0.0.39607.0_.aspx:16
a
. 올바르게 모델의 설정에서 사용자 정의 웹 서비스를 포함하는 경우
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="CMSExtensions.Model.Services.PublicationInfo" behaviorConfiguration="Tridion.Web.UI.ContentManager.WebServices.DeveloperBehavior">
<endpoint name="PublicationInfo" address="" behaviorConfiguration="Tridion.Web.UI.ContentManager.WebServices.AspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="Tridion.Web.UI.ContentManager.WebServices.WebHttpBindingConfig" contract="CMSExtensions.Model.Services.PublicationInfo"/>
</service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
웹 서비스 코드와 명령의 JavaScript도 함께 공유 할 수 있습니까? 그것들이 없으면 여기에서 잘못된 것이 무엇인지보기가 꽤 어렵습니다. –
@FrankvanPuffelen - 코드 스 니펫을 추가했습니다. – sachspeak
해당 구성의 들여 쓰기를 수정하십시오. 모든 텍스트 편집기에서이 작업을 수행 할 수 있으며 모든 사용자가 쉽게 읽을 수 있습니다. –