volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

AI OnAI Off

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:

	
		GetList
		urn:uuid:8719780a-c16e-4fef-9f44-f14dcae8bad5
		
			http://www.w3.org/2005/08/addressing/anonymous
		
		http://192.168.40.151/workarea/services/LibraryService.svc
	
	
		
			
				<_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
				<_x003c_aggregatefield_x003e_k__backingfield xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Id
				<_x003c_groupbyfield_x003e_k__backingfield xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Id
				<_x003c_groupbyoperation_x003e_k__backingfield xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">None
				<_x003c_orderbydirection_x003e_k__backingfield xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Descending
				<_x003c_orderbyfield_x003e_k__backingfield xmlns="http://schemas.datacontract.org/2004/07/Ektron.Cms.Common">Id
				<_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>
						
							<_x003c_field_x003e_k__backingfield>ParentId
							<_x003c_operator_x003e_k__backingfield>EqualTo
							<_x003c_value_x003e_k__backingfield i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">157
						
					
					<_x003c_condition_x003e_k__backingfield>And
				
				<_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
			
		
	


Response:

	
		http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault
		urn:uuid:8719780a-c16e-4fef-9f44-f14dcae8bad5
	
	
		
			
				s:Receiver
				
					a:InternalServiceFault
				
			
			
				Object reference not set to an instance of an object.
			
			
				
					
					
					Object reference not set to an instance of an object.
					   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)
					System.NullReferenceException
				
			
		
	

Thanks for advance for any help. 

#176716
Mar 24, 2017 6:08
error 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.