Invalid WSDL error appears on SmartForms on Endpoint Webservice SmartObject call after restarting K2 service

  • 16 February 2021
  • 0 replies
  • 35 views

Userlevel 5
Badge +20
 

Invalid WSDL error appears on Smartforms Endpoint Webservice SmartObject call after restarting K2 service

kbt140264

PRODUCT
K2 blackpearl 4.7
BASED ON
K2 blackpearl 4.7
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

After restarting the K2 blackpearl service, a SmartForms that makes use of Endpoints WebService SmartObjects errors with "Invalid WSDL".

Symptoms

1. After restarting the K2 blackpearl service, the first execution of an Endpoints WebService SmartObjects will require the Endpoints WebService broker to read the WSDL of the web service again to build out and register this web service as a dynamic assembly before it can call the methods of the web service.

 

2. This web service/WSDL is quite large in size/definitions; and does take a bit more time to load/read the WSDL and to build/register the dynamic assembly.

 

3. Execution of the same web service SmartObject via the SmartObject Service Tester tool does not error after a K2 blackpearl service restart.

 

4. It was determined that this error would appear if a SmartForms's Initialize method was calling multiple Endpoints WebService SmartObjects in a 'Concurrent/Asynchronous' block:

https://help.k2.com/kb001432

 

When doing so, the second web service call would be made before the first web service call is able to read and generate the dynamic assembly needed to make a successful call.  All calls thereafter is successful.  The call is successful in the SmartObject Service tester tool because only one call is made and as such it was able to generate and register the dynamic assembly during this call.

Resolution

As this behavior of the EndPoint Webservice broker is expected, different implementations exists to avoid this error:

 

1. As part of the K2 service restart procedure; perform a refresh of the endpoint web service instance using perhaps the SmartObject Service Tester tool; this will generate and register the needed dynamic assembly before users access the forms.

 

2. Or as part of the K2 service restart procedure; perhaps implementing a 'warm-up' workflow, form, or application that makes use of the K2 API to call a SmartObject Read/List for each endpoint web service service instance to ensure that the broker is ready before user access.

 

3. Reconfigure the SmartForms rule to such that it is called 'one after another', 'in a batch' or with a single EndPoint Web Service SmartObject call in a 'one after another' block first and then any other execution blocks can be used after (to serve as a 'warmup' SmartObject call).


0 replies

Be the first to reply!

Reply