K2 Integration with Web Services

  • 22 January 2009
  • 3 replies
  • 2 views

Badge +1

Hello All,

I am very new to K2 , We have K2 Blackpearl installed in our environment.

I would like to know if we can create SmartObjects using Web Services. Basically I have web services written in .Net, what I want to do is somehow hook K2 with the web services and get the SmartObjects.

As of now I am not able to understand how can I get data into smartobjects, can I connect K2 with SQL Server and get Data in the form of SmartObjects?

If not then how K2 Blackpearl is used? is it only used for workflows? 

I can see K2 SmartObjects Solution template in Visual Studio and using that I can create hollow smart objects. I am calling them hollow as I don't know how to persist those objects in a persistent medium. 

One more thing I would like to know, is there a way to create Web Parts in K2 ?

Any help will be greatly appreciated!

Thanks,

Avinash 


3 replies

Badge +8

Avinash, Do look at creating custom service objects. Smart objects connect to service objects to load data. You can create your own service object ( Which may read from any database) and connect your smart object to that.

I don't know what you are trying to achieve but there are variety of ways to connect to data shources in black pearl. I would say go ahead and read some post in under ground and do read documentationlike Developer Reference, User Guide etc.

HTH

Badge +2

In fact you do not need to write any code, it has already been written for you...  look at the following project on blackmarket:



 http://k2underground.com/k2/ProjectHome.aspx?ProjectID=45


this will allow you to connect your SmartObject to any web service, as long as the object model exposed is more or less "flat". Download and install the project - I think there are instructions included - and have a play around. The SmartObject testing tool, installed in C:/Program Files/K2 blackpearl/ServiceBroker is really great for testing your services / SmartObject integration.

Badge +1

Thanks K2.netdeveloper & Mike. Now I am able to connect smart objects with Web Services.

But When I tried creating/configuring WCF service, it gave me an error that 'Unable to import binding wsHttpBinding_ContractName from namespace <url>'. 

I  thought that K2 didnt like wsHttpBinding so I changed the binding to basicHttp, but that also didn't help though the error message changed to 'Validation Warning'.

Are there any special settings? does K2 accepts all types of bindings?

 

Thanks again for your help!

Avinash 


Reply