0

I have webservice in asp.net. it having the webmethod with return type as bool. I am inserting the record from infopath repeating table to xml file using my web method InsertRecord(). this is boolean type method. it returns true in insert record successful else returns false. but how to get return value in infopath.

Ondrej Tucny
  • 27,626
  • 6
  • 70
  • 90
Liladhar
  • 383
  • 5
  • 20

1 Answers1

0

For InfoPath 2007 MSDN states: β€œFor a submit operation, you can set the XML payload, but you cannot retrieve the XML response.” For InfoPath 2010 I can't see a similar article on MSDN.

You have two options:

  1. redesign the web service to throw an exception in case of failure which will lead to a SOAP fault, and in turn a submit failure in InfoPath;
  2. use custom code to call the web service and submit the data yourself.
Ondrej Tucny
  • 27,626
  • 6
  • 70
  • 90