Connecting to a web service through c# code in VSTA - InfoPath Dev
in

InfoPath Dev

Connecting to a web service through c# code in VSTA

Last post 07-01-2008 03:30 AM by Bleak. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-24-2008 05:15 AM

    • sweta
    • Not Ranked
    • Joined on 06-17-2008
    • Posts 15

    Connecting to a web service through c# code in VSTA

    can anybody tell me how to connect to a web service using c# code or give me a link which specifies the procedure?

  • 06-24-2008 11:02 PM In reply to

    Re: Connecting to a web service through c# code in VSTA

    Hi Sweta,

    You don't necessarily need code to connect to a Web service. Just add a data connection and specify Web service. Because Web service's return XML, InfoPath can handle them natively.

    Cheers!

    Patrick Halstead
    Project Manager at Qdabra
  • 06-25-2008 03:21 AM In reply to

    • sweta
    • Not Ranked
    • Joined on 06-17-2008
    • Posts 15

    Re: Connecting to a web service through c# code in VSTA

    Hi, 

    Yeah I did that and it works. But the problem is if i want to pass a parameter to the web service and that parameter is'nt stored in any of the control fields in my infopath form then how should i do pass a parameter to the web service??

     

  • 07-01-2008 03:30 AM In reply to

    • Bleak
    • Top 500 Contributor
      Male
    • Joined on 04-16-2008
    • Germany
    • Posts 28

    Re: Connecting to a web service through c# code in VSTA

     Hi Sweta,

     

    I asked the same question recently, and got an answer from Greg here.

    To be a little more precise, each web service that can accept parameters has query fields in its DOM. So, when you want to pass a parameter to the webservice, you can create a rule that does this by assigning a value to the necessary query fields. Then you must use the "query using a data connection" action to update the results and there you go.
     

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