Skip to main content

Hi everyone,


I'm fighting with the dynamic web service smartMethod for three hours now and don't know how to get out of this situation.


I downloaded the DynamicWebService beta 4 source code and updated it following the code I found in this forum to avoid multiple web service errors.


It worked last week with a specific web service.


Nothing has changed since last week but now, the smartmethod fails with this too explicit message : "Object reference not set of an instance of an object"


I attached BPStudio to the K2HostServer process and can find that the exception comes from method ExecuteSingleMethod from class SourceCode.Workflow.Common.HostedServers.SmartObjects


I don't know how to debug this...


Please help....

There is a bug in the Dynamic Web Service that prevents it from working properly if you have more than one instance.  I have a fix I will be uploading soon.  If you would like to try it out, use the private mail feature of this site to send me a message and I will email it to you.

Thank you for the quick answer but this bug is already known and someone has already posted a workaround for the code. Last week, I had already two instances for the dynamic web service smartService, and it worked...


But if you tell me that your code could be even better, it could interest me


Wouah!


I don't know what you changed in the code, but my web services are working now...


Can you put some changelog in this post? or you prefer to wait for the blackmarket upload access?


The latest version I see on blackmaket is 4 months old.  I have an improvement to that version.  It is the same code but addresses a specific bug.

hi david,


can you provide us the dynamic web service smart service which supports returning datasets


Unfortunately that is not consistent with the SmartObject infrastructure.  SmartObjects deal with a single set of information.  A dataset can contain multiple sets (tables) that might not even be related. 



If you want to return a dataset, you can create a web service reference through the process references dialog and then access it using a server code event.  Using this technique, web services work just like they do in any other .NET project.  Just remember to put the URL of the service in an environment variable and set the service's URL property to the environment variable so you can easily move it to the different environments.


how can we map the dataset returned by the service to a property in a smart object??


 


Reply