LibraryService GetList API throws exception

Hi,

I have consumed LibraryService wcf under workarea and invoking GetList method, below code tries to fetch all librarydata instances for which parentId = 157. code is throwing exception NullRefernceException.

http://abc/workarea/services/LibraryService.svc

            ServiceReference2.LibraryManagerClient m = new ServiceReference2.LibraryManagerClient();
            var result = m.GetList(new ServiceReference2.LibraryCriteria
            {
                _filterGroups = new ServiceReference2.CriteriaFilterGroupOfLibraryProperty54GRdyE_P[]
                {
                    new ServiceReference2.CriteriaFilterGroupOfLibraryProperty54GRdyE_P
                    {
                         _filters = new ServiceReference2.CriteriaFilterOfLibraryProperty54GRdyE_P[]
                         {
                             new ServiceReference2.CriteriaFilterOfLibraryProperty54GRdyE_P
                             {
                                  Fieldk__BackingField = ServiceReference2.LibraryProperty.ParentId,
                                  Operatork__BackingField = ServiceReference2.CriteriaFilterOperator.EqualTo,
                                  Valuek__BackingField = 157
                             }
                         }
                    }
                }
                UseAggregationk__BackingField = false                
            });

I have managed to capture the in/out soap envelops as follows. I executed GetList method of ContentService which also gives NullReference exception. Is it generic problem with GetList? Criteria object looks to be constructed correct.

Request:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
	<s:Header>
		<a:Action s:mustUnderstand="1">GetList</a:Action>
		<a:MessageID>urn:uuid:8719780a-c16e-4fef-9f44-f14dcae8bad5</a:MessageID>
		<a:ReplyTo>
			<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
		</a:ReplyTo>
		<a:To s:mustUnderstand="1">http://192.168.40.151/workarea/services/LibraryService.svc</a:To>
	</s:Header>
	<s:Body>
		<GetList xmlns="http://tempuri.org/">
			<criteria xmlns:b="http://schemas.datacontract.org/2004/07/Ektron.Cms.Content" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
				<_columns i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common"/>
				<_filterGroups i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common"/>
				<_logicalOperation xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">And</_logicalOperation>
				<_x003C_AggregateField_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Id</_x003C_AggregateField_x003E_k__BackingField>
				<_x003C_GroupByField_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Id</_x003C_GroupByField_x003E_k__BackingField>
				<_x003C_GroupByOperation_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">None</_x003C_GroupByOperation_x003E_k__BackingField>
				<_x003C_OrderByDirection_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Descending</_x003C_OrderByDirection_x003E_k__BackingField>
				<_x003C_OrderByField_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Id</_x003C_OrderByField_x003E_k__BackingField>
				<_x003C_PagingInfo_x003E_k__BackingField i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common" xmlns:c="http://schemas.datacontract.org/2004/07/Ektron.Cms"/>
				<_x003C_RequiredFilterGroup_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">
					<_filters>
						<CriteriaFilterOfLibraryProperty54GRdyE_P>
							<_x003C_Field_x003E_k__BackingField>ParentId</_x003C_Field_x003E_k__BackingField>
							<_x003C_Operator_x003E_k__BackingField>EqualTo</_x003C_Operator_x003E_k__BackingField>
							<_x003C_Value_x003E_k__BackingField i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">157</_x003C_Value_x003E_k__BackingField>
						</CriteriaFilterOfLibraryProperty54GRdyE_P>
					</_filters>
					<_x003C_Condition_x003E_k__BackingField>And</_x003C_Condition_x003E_k__BackingField>
				</_x003C_RequiredFilterGroup_x003E_k__BackingField>
				<_x003C_RequiredFilterSql_x003E_k__BackingField i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common"/>
				<_x003C_UseAggregation_x003E_k__BackingField xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">false</_x003C_UseAggregation_x003E_k__BackingField>
			</criteria>
		</GetList>
	</s:Body>
</s:Envelope>

Response:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
	<s:Header>
		<a:Action s:mustUnderstand="1">http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault</a:Action>
		<a:RelatesTo>urn:uuid:8719780a-c16e-4fef-9f44-f14dcae8bad5</a:RelatesTo>
	</s:Header>
	<s:Body>
		<s:Fault>
			<s:Code>
				<s:Value>s:Receiver</s:Value>
				<s:Subcode>
					<s:Value xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</s:Value>
				</s:Subcode>
			</s:Code>
			<s:Reason>
				<s:Text xml:lang="en-US">Object reference not set to an instance of an object.</s:Text>
			</s:Reason>
			<s:Detail>
				<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
					<HelpLink i:nil="true"/>
					<InnerException i:nil="true"/>
					<Message>Object reference not set to an instance of an object.</Message>
					<StackTrace>   at Ektron.Cms.Common.Criteria`1.GenerateSql(DbCommand command, Dictionary`2 columnMap, String& columnList, String& whereClause, String& orderByClause)
   at Ektron.Cms.Common.Criteria`1.GenerateSql(DbCommand command, Dictionary`2 columnMap, String& whereClause, String& orderByClause)
   at Ektron.Cms.Common.Criteria`1.PopulateCommand(DbCommand command, Dictionary`2 columnMap, String tableName)
   at Ektron.Cms.BusinessObjects.Core.Content.LibraryManagerDal.GetList(LibraryCriteria criteria)
   at Ektron.Cms.BusinessObjects.Core.Content.LibraryManager.GetList(LibraryCriteria criteria)
   at SyncInvokeGetList(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
					<Type>System.NullReferenceException</Type>
				</ExceptionDetail>
			</s:Detail>
		</s:Fault>
	</s:Body>
</s:Envelope>

Thanks for advance for any help. 

#176716 Mar 24, 2017 6:08