Webservice availability... - InfoPath Dev
in

InfoPath Dev

Webservice availability...

Last post 03-12-2006 01:43 AM by Agni Jonnalagadda. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-10-2006 02:17 AM

    Webservice availability...

    Hello,

    in most of my forms I use the "Active Directory Webservice" from this site. I have set the option that the data "Automatically retrieve when form is opened".

    But sometimes our users want to fill out the forms without any connection to our network and therefore they get an error message while they open the form.

    So my question: Is there a way that I can check the availability of the webservice at startup and depending of the check result either use the webservice to retrieve my data or leave the fields blank.

    Many thanks in advance.
    Karsten
  • 03-10-2006 11:16 PM In reply to

    Re: Webservice availability...

    Hi Karsten,
    You need uncheck the option "Automatically retrieve when form is opened" when you are taking the connection and query the webservice "on button click" or in the code.

    You can add rules to your button to query the dataconnection.
    In the code you need get the webservice adapter and query that.


  • 03-11-2006 02:17 AM In reply to

    Re: Webservice availability...

    Hi Agni,

    thanks for your reply. Yes, you are right. I can uncheck the option "Automatically retrieve when form is opened" and I can query my webservice in the code.

    But do you know how I can check -anyway- if a webservice is just available --- that I can retrieve data.

    My problem is not to query the dataconnection itself but to check if I can retrieve data at all from the webservice.

    Thank you for your help
    Karsten
  • 03-12-2006 01:43 AM In reply to

    Re: Webservice availability...

    You can put your code in try-catch block, if the webservice is not available then exception is raised by InfoPath and your catch block can perform what should happen if webservice is not available.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.