We are submitting Request and View Access tasks via TEWS and would like to add an expiration date and service duration to the TEWS call. Duration does not appear in the default WSDL, and setting an end date gives an error that it is read-only.
To add Duration, modify the List Screen on the profile tab of the Request and View Access task (task tag ManageAccessRequestMembership) to include Duration in the fields that appear in the search results and set its permission to Read/Write. To test in SOAP UI, update the service definition then add the duration element with a desired value. For example add <wsdl:duration>Unlimited</wsdl:duration> into the request within the <wsdl:add> element.
For Expiration date, change the permission for Expiration Date on the List Screen on the profile tab of the Request and View Access task to Read/Write in order to add a value for the endDate element into the SOAP request.
Note that adding Duration to the search results in the task will result in that field showing in the Request and View Access task in the IM UI with NOCHANGE as the value. The Expiration Date column will continue to show Unlimited or a particular date if, for example, you set duration to a number of months or years. If this is not desired, use a copy of the task for TEWS requests only.