Hi,
I am developing an IP form which sends data to a web service that, in turn, calls stored procedures in an SQL-Server. This web service has only two methods that handle Submit and Receive IP actions, respectively. The IP submit data connections perform insert, update and delete queries, and the receive data connections just retrieve data, that is, they just carry out select queries. At the moment, I am trying to retrieve error messages from the database and display them on the InfoPaht client, in a TextField.
So far, I have been creating IP rules with submit data and receive data connections. Si I first submit parameter to my web service, wich in turn calls a stored procedure (insert, update or delete) on my database. Subsequently, if an error occurs in the stored procedure, it is stored in the database. The second action of this rule, the receive data connection, looks up an error message from the database, which is then displayed by the InfoPath Client. It works like so:
INFOPATH CLIENT - - - - - - - - - - - - - - - - - - - - - - - - - - - -> WEB SERVICE - - - - - - - - - - - - - - - - - - - - - - - - - - -> SQL SERVER
Rule:
Action 1: Submit Data Method SendData() called stored procedure called (insert, update or delete). If error occurs, save it into table Errors [1st SERVER ROUND-TRIP]
Action 2: Receive Data (error message) Method GetData() called stored procedure called (select error message by id) [2nd SERVER ROUND-TRIP]
The two actions from the InfoPath client entail two server round-trips - one to call an insert, update or delete query and another to eventally retrieve errors that might have occured while inserting, updating or deleting data, and send them to the InfoPath client. For performance reasons, I would like to store, update or delete data in my database and eventually getting back an error message with just one server round-trip. My question is:
Is it possible to get any data back to the InfoPath client after performing a Submit Data action with just one server round trip or I will always have to add a Receive Data action in my rules to retrieve possible error messages?
Thanks in advance,
Lestomos