Get form version history with webservice - InfoPath Dev
in

InfoPath Dev

Get form version history with webservice

Last post 08-12-2011 12:26 PM by The Todd. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-04-2011 08:25 AM

    Get form version history with webservice

    G'day,

     I'm trying to use the versions webservice to get the current form's version history and display it in a read only format. Am I going about this in the correct way or is there a better way to accomplish my goal?

     Thanks in advance!

    --
    The Todd
  • 08-10-2011 12:05 AM In reply to

    Re: Get form version history with webservice

    Hi The Todd and welcome!

    What's your goal? Seriously, if it works for ya, great!

    Patrick Halstead
    Project Manager at Qdabra
  • 08-10-2011 02:42 PM In reply to

    Re: Get form version history with webservice

    Thanks! I'm sorry, I'm trying to use the webservice, but I'm not having any success getting it to work correctly. That's why I was asking if there was a better way to accomplish this. I'm sure it's some little thing i'm missing. When I try to add the webservice connection it asks for a sample value. I've tried entering the filename and different forms of a filepath with no luck. It seems very straightforward. Devil's in the details right? haha

    sample values I've tried:
    http://servername/sitename/list/filename.xml
    list/filename.xml

    filename.xml

    Also, when I changed the path. I changed the webservice address accordingly for example: (I wasn't sure if it would make a difference)

    http://servername/sitename/_vti_bin/versions.asmx
    http://servername/sitename/listname/_vti_bin/versions.asmx

    Thanks again,

     Todd

    --
    The Todd
  • 08-10-2011 03:11 PM In reply to

    Re: Get form version history with webservice

    From MSDN, for Versions.GetVersions:

    Parameters

    fileName

    A string that contains the site-relative URL of the file in the form Folder_Name/File_Name.

    So, your list/filename.xml should be correct, if that is the relative URL.

    However, when I tried this, I found that I had to URL encode my relative path. So instead of Shared Documents/filename.xml, it had to be Shared%20Documents/filename.xml.

    All that being said, just because we can create a data connection in InfoPath successfully to a web service, doesn't mean that we are going to get back anything that InfoPath can use - the data connection I created could probably have the returned data accessed programatically, but the XSD created by InfoPath just goes to a group level.

     

    Hilary Stoupa

  • 08-12-2011 12:26 PM In reply to

    Re: Get form version history with webservice

    Thanks Hilary! That worked!

    So now that I have the data connection.. I have a structure for the webservice that looks like this: (all icons in the tree are folders with locks on them except for the fileName, which has a file-icon)

    • MyFields
      • queryFields
        • ns3:GetVersions
          • fileName (file icon)
      • dataFields
        • ns3:GetVersionsResponse
          • GetVersionsResult

    Is there a way to pass the current filename into the service and pull the version history data out for that file?

    I'm a bit new to this and I'm just trying to grasp how it works with the webservice.

    Thank you

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