Smartobject method


Badge +8
I created a smart object and added a method to execute a stored procedure in a database and return the data. but when i integrated the smartobject with my infopath form, the input and output paramters group are always empty. What should i do to see the input and output properties listed in thire respective groups??

12 replies

Badge +8

does anyone have answer to this??

Badge +11

Your SmartObject should work just like any other SmartObject.  What service is it connecting to?

Badge +8
It is connecting to dynamicsqlservice. i tried with dynamicsqlspservice also..both of them are not working..
Badge +6
I recommand to debug the Service objects, so that you can understand what is going on in and out, in some case's it is failing thus you are not getting input and output parameter in smartobject. please verify...
Badge +9
See the known issues in the notes for Dynamic SQL Stored Service broker.  There is a known issue that the broker stops enumerating if it hits a SP that has similar named input parameter and output column names.
Badge +8
I tested the smart object with the tester tool.. but certain methods did not show these input properties. I have another method based on AD Service but that is working fine
Badge +8
Could you please explain a bit more??
Badge +6

What Jonny has responding is absolutly right, if you have Stor proc that uses input parameter and column return param from Select statment are same, service broker will not work. I think, this case it's unable to fetch the information from DB and failing. 

Create the service instance through K2 workspace, you come to know where it was failing, do not use the Broker management.exe for createing the instance.

Hope you understand.

 

 

 

Badge +8
what are the modifications required in the service broker?
Badge +9

The reason is that in the code that adds the parameters, we first loop through all the SP params and add them as input params for the service method.  The second portion then does a DescribeSchema call to get the column information.  There is a loop that adds each column as a output param for the service method.


Now the problem is that if the same param name is the same, you will get a key error as the code tries to add a param with the same key (i.e. the name).  The correct thing would be to add the param and indicate that the direction is in/out.


As the broker was done pretty quickly (it was coded, tested and debugged in about 4-5 days if I recall correctly), so I guess we didn't take this into consideration.  i.e. populate the params and column names into an array before adding them.


If you have time, you are welcome to modify the code and get this working properly or you could wait for the final supported versions in the upcoming 090x release.

Badge +8
But i do not have parameters with same input and output names. In fact, one of the methods that i created does not even have a input parameter.
Badge +9
I guess you have to then attach a debugger with the source code and troubleshoot from there.  Normally I put a breakpoint at the exception handler and I can see the exception message thrown.

Reply