Problem updating content expiry date using Content.asmx web service

Vote:
 

Hi,

I am new to Ektron development and would appreciate any help with a problem updating the ExpireDate property of content using the ContentSoapClient (exposed in the Content.asmx web service  accessed as a service reference from a WCF client). The edit method works fine for the Title and HTML properties and I can see these values being updated in the Ektron Content table. The last_edit_date field is also updated. However the end_date field is set to NULL rather than the value in the ExpireDate property. I've considered whether there is a problem with the format of the value being assigned to the ExpireDate property but the datetime value is handled in an identical fashion by AddContent4 method with which there no problem.

The following code snippet may give a clue as to what I'm missing here. BTW We are using Ektron version 9.

Many thanks

EktronContent.ContentSoapClient cxClient = new EktronContent.ContentSoapClient();
EktronContent.RequestInfoParameters cxReqParams = new EktronContent.RequestInfoParameters();

cxReqParams.ContentLanguage = contentLanguage;

blnRetVal = cxClient.CheckOutContent(GetContentAuthHeader(), cxReqParams, lngContentId);

ContentEditData ContentToUpdate = new ContentEditData();

ContentToUpdate = cxClient.GetContentForEditing(GetContentAuthHeader(), cxReqParams, lngContentId);

if (ContentToUpdate != null)
{
  if (dtEndDate.HasValue)
  {  
   ContentToUpdate.ExpireDate = (DateTime)dtEndDate;   
  }
  else
  {
   ContentToUpdate.ExpireDate = DateTime.MinValue;
  }

 ContentToUpdate.Title = strTitle;
 ContentToUpdate.Html = strXML;
     
 blnRetVal = cxClient.SaveContent(GetContentAuthHeader(), cxReqParams, ContentToUpdate);

 blnRetVal = cxClient.PublishContent(GetContentAuthHeader(),
       cxReqParams,
       lngContentId,
       (long)folderID,
       contentLanguage,
       null,
       10007,
       null);
}

#176684
Mar 23, 2017 15:12
Vote:
 

Try updating the EndDate and EndDateAction properties instead. 

#176713
Mar 24, 2017 2:20
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.