Best practice on REST web services - InfoPath Dev
in

InfoPath Dev

Best practice on REST web services

Last post 10-27-2015 02:26 PM by djj6677. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-24-2015 02:01 AM

    Best practice on REST web services

    Hi everyone, I use InfoPath 2013, and have recently purchased QRules... I have a series of existing InfoPath web forms which use WCF REST Web services, querying the Data using ODATA (with InfoPath Rules) and then submitting new records using Custom Code. Now I have QRules I'm hoping to remove some of the custom code replacing it with QRules functionality.... So my question is... Can I use QRules to submit data to a WCF web service, and if so, how? (which command etc) If there is a worked example or video tutorial somewhere, that would be perfect. Many thanks in advance, David Jones
  • 10-25-2015 06:10 AM In reply to

    Re: Best practice on REST web services

     Hello,

     Thank you for your post on infopathdev. You can use the qRules commands like SubmitToSharePoint to submit to a library and  SubmitToSharePointList to submit data to a SharePoint list. 

     Here is the link to the blog by Hilary: http://www.infopathdev.com/blogs/hilary/archive/2012/05/30/qrules-submittosharepointlist-walkthrough-for-v4-2.aspx

     Hope this helps!

     Kind Regards,

     Reema

    Reema Daga
    Qdabra® Software / InfoPathDev.com / FormsQuo / 425 999 4597 direct

    Business Process Automation for Everyone – Streamline data gathering to turn process into knowledge.™

     

      

  • 10-25-2015 04:28 PM In reply to

    Re: Best practice on REST web services

     Thanks Reema,

    Just briefly the QRules command "SubmitToSharePoint" - will that work for Web services which are NOT in SharePoint?

     (Because my web Service is a WCF REST web service, just hosted on a standard web server, not SharePoint) 

     

    thanks again,

    David 

  • 10-26-2015 08:53 AM In reply to

    Re: Best practice on REST web services

    SubmitToSharePointList is specifically meant for submitting items to SharePoint Lists, I'm afraid. What does your current custom code do? I can maybe help you find a combination of qRules commands that could do what you need....
    Hilary Stoupa

  • 10-26-2015 04:24 PM In reply to

    Re: Best practice on REST web services

     Hello Hilary,

    The custom code does the really basic CRUD operations... - Insert a single record, delete a single record and update a single record. (All using secondary data sources) and the data source is an SQL Table.


    So essentially I use the "Change REST URL" rule to query the source using ODATA, and then need a method to allow the user to make changes to the displayed records.

     If there's a completely different approach to this, happy to consider that as well.

    (I have seen a QRules command to execute SQL, but I'm a bit reluctant to do this, since it has a potential risk of SQL injection attacks...) 

    thanks in advance,

    David 

  • 10-26-2015 05:05 PM In reply to

    Re: Best practice on REST web services

    Hey, David - yah, you have carefully restrict user input with execute SQL - you'd need to use dropdowns or validation rules (or other rules to sanitize input). But I had thought you were asking about submitting to a web service - have you got a web service that talks to your SQL table?
    Hilary Stoupa

  • 10-26-2015 05:17 PM In reply to

    Re: Best practice on REST web services

     Yes, exactly, the web service talks to the SQL table.

    My preference would be to  use the web service to update the tables.

     

    regards,
    David 

  • 10-27-2015 07:49 AM In reply to

    Re: Best practice on REST web services

    Okay, sorry, I feel like we are going in circles. :) What is your custom code doing? If you are using a web service to write back to SQL, where does the custom code come in?
    Hilary Stoupa

  • 10-27-2015 02:26 PM In reply to

    Re: Best practice on REST web services

     This might be the amusing part, but I don't know how to update the SQL tables through a web service, except by using Custom Code....

     So it's a REST (WCF) web service - I just need to do single record inserts, updates and deletes...

     

    The data connection is a secondary data source, and I've always understood that it's for retrieval, not updating, am I wrong?) 

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.