Map Complex SOAP Object Parameter to K2 SmartObject

  • 16 December 2013
  • 1 reply
  • 0 views

Badge +1

Hi there,


I am trying to figure out how to map a smartobject method to a SOAP web services method that takes in a complex type. The web service signature in C# is as follows:


 


 [System.ServiceModel.ServiceContract()]


 public class PublishService : ServiceStack.Service


    {


        [System.ServiceModel.OperationContract()]


        public object Post(PublishRequest publishRequest)


 


        {


        }


}


 


PublishRequest is as follows:


[DataContract(Namespace = "mynamespace")]


 public class PublishRequest


    {


       [DataMember]


        public DateTime published { getset; }


        [DataMember]


        public string message { getset; }


 


    }


I have done the following so far:


 


1. I have created an Endpoints WebService Instance using the K2 Workspace Management Console


2. I have created an smartobject in Visual Studio and  followed the steps shown here: http://blog.myitechnology.com/2009/07/how-to-create-k2-smartobject.html


3. However when I get to the Add Service Object Method stage it creates one parameter of type Memo named PublishRequest. 


 


How can I Map the C# Web Service Post(PublishRequest publishRequest) method to a SmartObject Method that accepts or allows me to populate a PublishRequest object parameter?


 


Best Regards,


Tham


1 reply

Badge +9

Using the SmartObject Service Tester, can you drill down into your endpoint and see how it looks there? You may need to right click it and refresh it to make sure all the parameters are pulled in to K2's definition of your service.

Reply