Data fields to web servcie parameters - InfoPath Dev
in

InfoPath Dev

Data fields to web servcie parameters

Last post 04-22-2006 04:56 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-22-2006 03:28 AM

    • gaurs
    • Not Ranked
    • Joined on 04-04-2006
    • India
    • Posts 12

    Data fields to web servcie parameters

    I have a custom web service. I have configured a data connection on my infopath form for data retrieval through this web service. As part of the configuration, wizard asks for input parameter. I want to pass on a value defined on the infopath form but the wizrd asks for a sample value and always uses this value for data retrieval unlike the submit web service for which parameter values can be selected from the infopath datasource.
    My question is:

    How can I pass on a value from infopath form to the web service for data retrieval.
  • 04-22-2006 04:56 PM In reply to

    Re: Data fields to web servcie parameters

    Hi Shweta,

    I haven't actually done this before, but after browsing through the InfoPath SDK I am pretty sure you could do this using code. Take a look at the WebServiceAdapter object and I think you should be able to set the query parameters from within the input property. A quck code example would be something like this:

    var objWSAdapter;
    objWSAdapter = XDocument.DataObjects("Web Service Connection").QueryAdapter;

    // Display so we can see what's going on in this input property
    XDocument.UI.Alert( "Old input value: " + objWSAdapter );

    // Set a new input property with appropriate stuff
    objWSAdapter.Input = "New input string - this is probably going to be XML";

    I hope this helps, please let us know if you figure it out!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.