Return Value From Web Service - InfoPath Dev
in

InfoPath Dev

Return Value From Web Service

Last post 03-26-2009 04:21 AM by Vedran. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-27-2008 12:51 PM

    Return Value From Web Service

    Hello all!

     Ok, this seems like a pretty common question asked around this forum but none of the solutions for other people have been working for me. I am SO CLOSE to having this work but still no cigar. Here is what I want to do:

     

    Submit a complex datatype to a webservice and return a newly generated report number back to the InfoPath Form from the web service.

     

    Right now I have a secondary datasource that does this great! the ONLY problem is that when I try to save the form to my hard drive (to submit at a later date) the data is gone when i open it up.

     

    I've tried the webServiceAdapter2 and outputlocation (couldn't get it to work for me)

    I've tried the Send and Recieve(didn't work for me)

    I've tried the Recieve and just submitted that, and this did work except for the whole saving the form data for later thing. Please help!

     

    Thanks!

  • 06-27-2008 10:27 PM In reply to

    Re: Return Value From Web Service

    I have done this with the Qdabra web services.

    To get the return value it must be setup as a receive connection and submit via code.

    Hope that helps.

  • 07-03-2008 08:39 AM In reply to

    Re: Return Value From Web Service

    I still can't get this to work right.

     As of now I can use a receive connection to properly get back my value from my web service but now the problem is I can't query the same form by that value for edits.

     This is all I want to do

     Recieve goes to a web service routine like this:

    [WebMethod]

    public InfoPathReport GetReport(string ReportNumber)

    {

    InfoPathReport oReport = new InfoPathReport(ReportNumber);return oReport;

    }

     

     Submit goes to this

    [WebMethod]
    public string SaveInfoPathReport(InfoPathReport oReport)

    {

    oReport.SaveReport();

    return oReport.ReportNumber.ToString(); //returns the newly generated report number

    }

     

     

    why is this such a hard thing to do? It shouldn't be.

     

    I want my users to be able to fill out a new report, submit it, get a report number back and maybe save it to their pc if they want.

    I want my admin to be able to see that a user filled out a report, query it by the reportnumber, make some changes, and submit the form back. This should not be this difficult. Can you please help? Thank you!

  • 03-26-2009 04:21 AM In reply to

    Re: Return Value From Web Service

    InfoPath by default doesn't care about any return values from submit action. It looks at HTTP response code and determents if action is successful or not.You should invoke submit from code in InfoPath and there do something with your return value form webservice.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.