10 Replies Latest reply on Mar 3, 2009 11:08 AM by MarcelBoucher

    Submit Data to Share Point Site.

      I am trying to extract data from ADOBE Form and send them to
      the Share Point Address. I created Submit Button, choose XFDF
      as export Format, and put following URL:
      http://affinityshare/enrollment/AppExtract#FDF
      But I was not successfull in submittting the file.
      Please help somebody.

      P.S. If I use "mailto:" option it works perfect
      but I need to collect data in the Sharepoint.
        • 1. Re: Submit Data to Share Point Site.
          Patrick Leckey Level 3
          Is AppExtract a webservice setup to receive and store an XFDF?
          • 2. Re: Submit Data to Share Point Site.
            Level 1
            Thanks for Your quick responce.

            This Sharepoint site setup as a Document library.
            Is it reqire special settings to store as an XFDF file?
            • 3. Re: Submit Data to Share Point Site.
              gkaiseril MVP & Adobe Community Professional
              You may need to modify or establish a custom web page within SharePoint to process this information. SharePoint servers are web servers that run a special Database to access pages and documents. It is not a standard web server.
              • 4. Re: Submit Data to Share Point Site.
                Level 1
                Thank You, Geo.

                I tried to use URL http://bxdeviis1/affinitybrowser/#FDF or
                http://www.bxdeviis1/affinitybrowser/#FDF
                for our Intranet standart Web site and got no proper results.
                • 5. Re: Submit Data to Share Point Site.
                  Level 1
                  Since nobody can help me with my issue of submiting data to Internet Address, maybe somebody had experience with submitting data
                  to the Local Network: \\[server]\[folder]\[subfolder], in my case:
                  \\ahpfs1\vol1\prod\compile\appextract#FDF.

                  I tried to reffer my question to ADOBE Technical Support Team,
                  worked with 4 Representatives and no one of them was able to help me.

                  Thanks,
                  Mikhail.
                  • 6. Re: Submit Data to Share Point Site.
                    Patrick Leckey Level 3
                    Did you log a case with Developer Support, since this would be a Developer issue and not a Technical Support issue? I very much doubt Technical Support would know how to handle the above, but Developer Support most definitely would.

                    You cannot submit data directly to a share or to Sharepoint as your are trying to do. All the Submit button does is open the URL you give and submit the data as a POST request. If you want that data to be stored somewhere or integrated with sharepoint, you will need to write a webservice that collects the data from your form and then saves it in the manner you want. You would then give the Submit button your webservices URL to submit the data to.
                    • 7. Re: Submit Data to Share Point Site.
                      Level 1
                      PDL:

                      Could You please give me Web site or E-Mail Address
                      in order to log a case with Developer Support.

                      Thank You.
                      • 8. Re: Submit Data to Share Point Site.
                        My suggestion would be to purchase Microsoft InfoPath as this product is used to create and maintain forms on a Microsoft SharePoint Server.
                        • 9. Re: Submit Data to Share Point Site.
                          MarcelBoucher Adobe Employee
                          Forget InfoPath :) <br />It's actually very simple to get this working. Here is a link to a good MSDN article on how to create custom handlers (ashx) for Sharepoint 3.0: <br />http://msdn.microsoft.com/en-us/library/bb457204.aspx <br /> <br />All I did was follow that example, and extend it to accept an XML post. In the sample I created, I am not parsing the XML or adding any processing logic. just take the XML and post it as a new entry in the Shared Documents list. Then, all you need to do is configure your XDP submit button to point to the .ashx file (eg. http://mysharepointserver/_layouts/SP_PDFSubmitHandler.ashx). Voila! Just post the PDF form in sharepoint and let the magic happen :-) <br /> <br />********** Start Code *********************** <br /><%@ Assembly Name="Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e942 9c" %> <br /><%@ WebHandler Language="C#" Class="SP_PDFSubmitHandler" %> <br /> <br />using System; <br />using System.Web; <br />using Microsoft.SharePoint; <br />using System.Xml; <br /> <br />public class SP_PDFSubmitHandler : IHttpHandler { <br /> <br /> public void ProcessRequest (HttpContext context) { <br /> SPSite site = SPContext.Current.Site; <br /> SPWeb web = site.OpenWeb(); <br /> <br /> try <br /> { <br /> string rawXML = ""; <br /> XmlTextReader reader = new XmlTextReader(context.Request.InputStream); <br /> XmlDocument xmlDoc = new XmlDocument(); <br /> xmlDoc.Load(reader); <br /> string _xmlString = xmlDoc.InnerXml; <br /> <br /> System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); <br /> string _fileTime = DateTime.Now.ToFileTime().ToString(); <br /> <br /> byte[] docAsBytes = encoding.GetBytes(_xmlString); <br /> <br /> //Insert Document <br /> web.AllowUnsafeUpdates = true; <br /> SPFileCollection oListItemDest = web.GetFolder("Shared Documents").Files; <br /> oListItemDest.Add("PurchaseOrder_" + _fileTime + ".xml", docAsBytes, true); <br /> <br /> <br /> } <br /> catch (Exception ex) <br /> { <br /> context.Response.Write(ex.Message); <br /> } <br /> <br /> <br /> } <br /> <br /> public bool IsReusable { <br /> get { <br /> return false; <br /> } <br /> } <br /> <br />} <br />************** end Code *****************
                          • 10. Re: Submit Data to Share Point Site.
                            MarcelBoucher Adobe Employee
                            Actually, here is a better sample... It shows how you can extract form field data and populate a list. <br /> <br />*************** Begin Code *********************** <br /> <br /><%@ Assembly Name="Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e942 9c" %> <br /><%@ WebHandler Language="C#" Class="SP_PDFSubmitHandler" %> <br /> <br />using System; <br />using System.Web; <br />using Microsoft.SharePoint; <br />using System.Xml; <br /> <br />public class SP_PDFSubmitHandler : IHttpHandler { <br /> <br /> public void ProcessRequest (HttpContext context) { <br /> SPSite site = SPContext.Current.Site; <br /> SPWeb web = site.OpenWeb(); <br /> <br /> try <br /> { <br /> string rawXML = ""; <br /> XmlTextReader reader = new XmlTextReader(context.Request.InputStream); <br /> XmlDocument xmlDoc = new XmlDocument(); <br /> xmlDoc.Load(reader); <br /> string _xmlString = xmlDoc.InnerXml; <br /> System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); <br /> string _fileTime = DateTime.Now.ToFileTime().ToString(); <br /> <br /> byte[] docAsBytes = encoding.GetBytes(_xmlString); <br /> <br /> //Insert Document <br /> web.AllowUnsafeUpdates = true; <br /> <br /> SPList list = web.Lists["Purchase Order"]; <br /> SPListItem item = list.Items.Add(); <br /> <br /> item["Title"] = "PurchaseOrder_" + _fileTime + ".xml"; <br /> item["Company Name"] = xmlDoc.GetElementsByTagName("txtOrderedByCompanyName").Item(0).InnerText; <br /> item["Date"] = xmlDoc.GetElementsByTagName("dtmDate").Item(0).InnerText; <br /> item["Order Total"] = xmlDoc.GetElementsByTagName("numGrandTotal").Item(0).InnerText; <br /> item.Attachments.Add("PurchaseOrder_" + _fileTime + ".xml", docAsBytes); <br /> item.Update(); <br /> <br /> <br /> context.Response.Redirect("http://mysharepointserver/Lists/Purchase%20Order/AllItems.aspx "); <br /> <br /> } <br /> catch (Exception ex) <br /> { <br /> context.Response.Write(ex.Message); <br /> } <br /> <br /> <br /> } <br /> <br /> public bool IsReusable { <br /> get { <br /> return false; <br /> } <br /> } <br /> <br />} <br /> <br />*********************** end Code ********************