How to invoke a Web Service from within InfoPath

K

Keith B

An InfoPath form contains Rich Text Fields that store a SOAP Request message
and a SOAP Response message. The user of the form would like to be able to
click a button which invokes a Web Service that he can use to send the SOAP
Request and Receive the SOAP response. What is the best way implementing a
Web Service query from within InfoPath? Please note that the Web Service is
not providing the XML on which the form is based. In this case, the form is
based on a flat file. Access to the Web Service provides data needed in the
form.

Thanks,

Keith
 
K

Keith B

Thanks for your response. I posted the following questions to the tutorial
web site:

1) Your tutorial specifies a web service running under IIS 6.0. Why is that
important? There are many
online web services and some are not running under IIS 6.0. How would the
example need to be different
to work with a non-IIS 6.0 Web site?

2) I cannot find any reference in the tutorial to a specific web service.
Probably, I do not know enough
about Web Services to identify what aspects of the code relate to a specific
web service. I guess another
form of this question would be: If I followed the tutorial exactly and
pasted your code from the code
examples, which web service would I be accessing when I run the example? Or,
what do I need to do
to provide the web service that this example uses?

3) So far, all of my infopath developement has used Jscript and the SP1 SDK
provides some very useful
JScript routines such as sorting an xml document object, etc. If I used
managed code such as C#, or
VB.net, will I need to re-create that Jscript funtionality, or can I use
Jscript along with the managed code?

Thanks,

Keith


Thanks again for creating this tutor
 
M

Michelle Beall

(1) IIS 6.0 is what I used when I created the sample. It shouldn't make a
difference, but I just wanted to point out what was used in the event that
someone should notice different behavior.

(2) I didn't specify a web service as the information contained applies to
any web service. The example assumes that you have a web service that you
want to call at runtime and possibly send parameters to. The method would be
the same. You add your web service as a secondary data source and then via
code can set values in the xml and query the data source. The article was
merely to demonstrate the technique used and did not provide a working
example. I can work on add one when time allows.

(3) Infopath doesn't currently allow for you to use JScript and Managed
Code. Right now you have to pick one or the other. There are more examples
for Jscript than for managed code right now. Managed code use only became
available in SP1.

I hope that answers your questions. Your initial post didn't specify
whether you were using managed code or script. I'm not aware of any script
examples though I'm sure there are some out there for connecting to a web
service.

Michelle
 
K

Keith B

Thanks Michelle, your clarifying remarks help me understand how to use your
example. Again, I can't tell you how much I appreciate the tutorial you
created.

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top