I would like to know if anyone has ever done this. I have seen Hillary's blog on doing this using SOAP from 2010; I'm wondering if anyone has done this using REST api calls (as data connections).
I have a web enabled form that runs on an SP2013 plaform. I am unable to use Hillary's example because of a curious problem in checking in the form. According to the log errors I'm getting an encoding problem with the URL string.
Here's the error: The following query failed: CheckInFile (User: 0#.w|#####\#####k, Form Name: XXXXX X-XX Infopath form 20151203, IP: , Connection Target: http://XXXXXXXX/sites/mrepr/XX XXXXXXX XXXXXXXX Dataconnection Library/CheckInFile.udcx, Request: http://XXXXXXXXXXX/sites/mrepr/_layouts/15/FormServer.aspx?XmlLocation=/sites/mrepr/XXXXXXXXXXXXX/XXXXX-XXXXX-XXXXXX XXXXX XXXX-20151223-14-22-12.xml&ClientInstalled=true&DefaultItemOpen=1&Source=http://XXXXXXXXXXXX/sites/mrepr/XXXXXXXXXXXX/Forms/AllItems.aspx%23InplviewHash8dedc315-54d9-4201-a9f5-084ae912555a=SortField%253DModified-SortDir%253DDesc, Form ID: urn:schemas-microsoft-com:office:infopath:XXXXXXXXXXX-X-XX-Infopath-form-20151203:-myXSD-2010-02-06T02-27-03 Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error. Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. Input string was not in a correct format. The remote server returned an error: (500) Internal Server Error.)
Since I can't seem to solve this encoding problem (it seems to be the %25 being thrown into the strings but these aren't strings that I have control over), I thought perhaps I could circumvent it by trying to use the REST to check in and check out the files when they are being edited.
Would some kind soul be willing to help me understand how to make the correct data connections to the infopath template? When adding the data connection in the form: http://server/site/_api/web it's somewhat overwhelming what you get in the form of choices. I'm not really sure how to hook these up to a form title to call the REST check out and REST check in commands. Thanks.
vr,
Kurt