InfoPath, Custom Web Services (UCDX connections) and blackpoint

  • 28 July 2009
  • 4 replies
  • 9 views

Badge +1

Its well known that  blackpoint doesnt cater for external data sources using SmartObjects, so the alternative is is to use Web Service methods as custom data connections in the InfoPath Form - sounds easy... Unfortunately, it requires a bit more work if you intend your users to open the InfoPath form in a Web Browser.


If you create a new data connection to a Web Service and use it in your InfoPath Form, you are going to run into problem. More specifically, an error when you try to open a new InfoPath form in InfoPath Client:


The query cannot be run for the following DataObject: SayHelloToUser
InfoPath cannot run the specified query.
Access to the connection file http://moss.k2demo.local/_layouts/GetDataConnectionFile.aspx is denied.


There is a couple of steps that you need to perform to fix this.


1. Design your InfoPath Form template and integrate with the K2 blackpoint process.


2. Add the Web Service data connections to the InfoPath template as per normal and complete the design of the InfoPath form and the blackpoint process to such a point that you are ready to deploy the process.


3. Open the InfoPath Form Template from K2 Studio and go to your data connections for the custom Web Services.


4. Click on 1 of the data connections and click on the Convert...  button on the right-hand site


5. In the 1st screen on the conversion wizard, specify the URL of the root SharePoint Site Collection, select the Centrally managed connection library (advanced) option and click Browse and click on K2 BlackPeal Data Connections and then on InfoPath Web Service. Then give your data connection a name and click on Save and then on OK. If you get and error saying that it cant connect to SharePoint - stop the Systen Event Notification Windows service and try again.


6. Repeat steps 4 and 5 for all the other data connections.


7. Now, open an IE browser and navigate to [Root Site Collection URL] > View All Site Content > K2 BlackPearl Data Connections > InfoPath Web Service. Click on the dropdown next to the data connection name and select Sent to > Download a copy. Save the UCDX file somewhere in a temporary forlder. Do the same for all your other data connections.


8. Open Central Admin and navigate to Application Management > InfoPath Form Services > Manage data connection files. Upload all the UCDX files that you downloaded in step 7.


9. Now go back to your InfoPath Form template and REMOVE all your custom data connections.


10. In the Data Connection screen, clic on the Add... button and select the Search for connections on a Microsoft SharePoint Server option and click Next.


11. In the Site dropdown, select your root Site Collection URL (if its empty, add it by clicking on Manage Sites...). In the treeview below, expand K2 BlackPeal Data Connections and click on Next until you can click on Finish.


12. Repeat steps 10 and 11 for the rest of your data connections.


13. Now you can deploy your blackpoint process and your InfoPath Client Events will open in a Web Browser without a problem.


 


If you have any questions on the above, please drop me a mail on eugenej@k2.com.


 


[eugenej]


4 replies

Badge +5

Hi all,


 This seems to be an Infopath 'limitation' where "You can’t make a cross-domain connection from a domain security browser form unless your data connection uses a UDC file",  I thought it would be good to post this link to a MSDN blog which addreses this subject. Enjoy.


http://blogs.msdn.com/infopath/archive/2006/10/02/Data-Connections-in-Browser-Forms.aspx


 Regards,


Frikkie

Badge +5

Steps to upload InfoPath form with custom data connections and K2 integration to SharePoint.



 


1.       Get InfoPath form with custom data connection ready, as per K2 underground article(http://www.k2underground.com/forums/32230/ShowThread.aspx#32230) : Steps 2 – 12


2.       Integrate your InfoPath form with K2 process, using ‘InfoPath Process Integration Wizard’: Ensure that deploy as ‘Form Library Template’ is selected.


3.       Deploy the K2 process.


4.       Navigate to SharePoint Form Library, where the InfoPath Form Template was deployed to, select ‘Explorer view’.


a.       Open the newly deployed InfoPath Form Template in ‘Design View’.


b.      Increase version of form: Form options > Versioning


c.       Publish the form to ‘Form Services’ – which will require ‘Admin Approval’


5.       @Sharepoint Administrator:


a.       Admin Approve the InfoPath form(upload to Central Admin).


b.      Activate the form as Content Type, if not yet activated.


6.       Change Document Library to ‘Allow management of Content Types’


7.       Add the Content Type uploaded in step 5(b) to the form library.


 


@Gert: Thank you for your input.


 


Follow up questions:


(1)    When I make changes to the form in the workflow, I will have to repeat the steps mentioned above


-          Yes.


(2)    When I make changes to the workflow itself (not the form), can I simply publish the workflow (and not do any of the steps above)?


-          NO, unfortunately you cannot only deploy the workflow.


 


To be safe, I would always do the steps – once you’ve done them a few times, it should not take more than 5 minutes.


 


Regards,


Frikkie

Badge +4
Thanks Dewald, this will help alot!
Badge

Yes, thanks to Wessel, Dewald, and Eugene for providing clarity on this issue and a viable work-around.  Sylvia and I are now able to move on with our project with the steps provided.  Hopefully Microsoft addresses this dilema in the next version of InfoPath.

Reply