Make REST calls via a Smart Object


Badge +2

I can see that there's an "Endpoints WebService" SmartObject available to add, but it looks like it only works with SOAP. Is there a way to make REST calls to an external service through K2 Designer using a SmartObject (or possibly without), without using Visual Studio to edit the workflow and add the REST call?


10 replies

Badge +6

Hi bmb56,


 


Please have a look at the following link below which discusses REST Services.


 


http://help.k2.com/helppages/k2blackpearlDevRef4.6.7/webframe.html#REST_Services2.html


 


Kind regards,


 


Yannick

Badge +2

Yannick,

 

That link appears to be for making REST calls from an external system TO Blackpearl, but I need to make REST calls FROM Blackpearl to an external system.

Badge +8

Use the Endpoints WebService service object.  It supports SOAP, but if you set the Add SOAP Parameter to Methods property to False, it should work.

Badge +2

When I use the Endpoints WebService service object, I get the following error: "VALIDATION Invalid WebService WSDL", which implies that it's still trying to use SOAP instead of REST, even with "Add SOAP Parameter to Methods" property set to false. 

Badge

I have the same issue as bmb56, was this resolved? And How?

Thanks

Badge +2

j5,

 

I spoke with somebody at K2. They don't support making REST calls from SmartObjects natively at the moment, but are planning to later this year. In the mean time, they recommended that I try the "HTTP Rest Broker" community service object here: http://community.k2.com/t5/K2-blackpearl/HTTP-Rest-Broker/ba-p/991

 

We're trying to get this configured this afternoon. I'll let you know how it goes, and whether or not it lets us invoke REST calls from SmartObjects and workflows.

Badge +1

Hello, 

 

Were you able to successfully register and use this broker?

I am getting an error when trying to register the service type.

 

Below is the information from the event viewer on the server.

 

Log Name: Application
Source: SourceCode.Logging.Extension.EventLogExtension
Date: 8/1/2014 7:14:43 PM
Event ID: 10521
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: 
Description:
10521 SmartObject Runtime.Management General Error: 'Could not load file or assembly 'file:///C:Program Files (x86)K2 blackpearlServiceBrokerK2Field.SmartObject.Services.REST.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Badge +2

We were able to install the service broker and create SmartObjects, but unfortunately haven't had the time to actually USE the SmartObjects yet.

 

We got an error during registration as well, and reached out for help. Here's what the plugin's creator had to say:

"Download the zip again.  But before you unzip it right click and ensure the property is checked to unblock.  Then the resulting next zip do the same thing."

 

Following these directions, we were able to register the resulting DLL. Apparently just using right-click/unzip causes problems with the DLL.

Badge +4

bmb56,

 

did you solve our problem? I  have same question.

Badge +2

No, we were never able to make this work. We eventually gave up after going back and forth with the company for a while and pursued other products. Sorry!

Reply