WCF returning typed object

  • 14 July 2014
  • 1 reply
  • 7 views

Badge +1

Hi,

I have a custom WCF service which is registred as WCF Endpoints in K2.

This service returns data containing multiple values which I have to assign to a SmartObject.

Aparat from xml is there any other typed data object  like List<string> OR DataSet which I can assign to a SmartObject.

 

I want to assgin the values returned from WCF service to DataFields. For single value it is working fine  but for multiple values returned by service I am unable to make it work.

 

E.g.

 The WCF service has method "returnEmpData" which want to return - EmployeeName,JoinDate,BirthDate,RollId. I want to give SmartObject call to this method to get values of these and assign those to DataField.

 

Thanks,

Sachin

 


1 reply

Badge +4

As long as your web method returns an object defined in your WCF interface, K2 should construct a SmartObject for the type for you and handle the deserialization. In other words, your SmartObject method call will then return a SmartObject containing all your individual properties defined in the object type.

Reply