Getting structure of web service - InfoPath Dev
in

InfoPath Dev

Getting structure of web service

Last post 06-16-2010 11:24 PM by blackhawk. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-16-2010 04:14 PM

    Getting structure of web service

    I have a web service function in a secondary data source that returns no rows of data, but I want to add a row to the data source result set programmatically using the structure that InfoPath sees when it queries the WSDL.  It would be easy if it returned a row, but since nothing comes back, I have no data to reference. 

     

    Does anyone have any ideas on how this can be done?    Using the schema at runtime somehow?

     

    PS: It needs to be generic enough that I can have it go against any secondary data source definition (i.e. not hard coded CreateElement and AppendChild functions).

  • 06-16-2010 10:44 PM In reply to

    Re: Getting structure of web service

    The template file sampledata.xml should contain sample XML of your main and secondary data sources.  You can access this at runtime using this.Template.OpenFileFromPackage(), access the part that you need to clone, and clone it as much as you want.

    A simpler alternative is to use qRules, which can accomplish all of this with one command:

    Insert /dsname=DataSourceName /parent=/path/to/repeating/node/parent /child=RepeatingNode /count=numToInsert

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 06-16-2010 11:24 PM In reply to

    Re: Getting structure of web service

    Thank you for the reply!!

     I guess I forgot to mention that I am running InfoPath 2007 in the 2003 object model.    I am unaware of an OpenFileFromPackage function in 2003 OM.   Is there such a beast?

     Thanks again!

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