NetTalk Central

Author Topic: Call webservice in netwebform  (Read 3101 times)

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Call webservice in netwebform
« on: February 08, 2013, 11:06:10 AM »
Hi,

I need to press a button at netwebbrowse selected record, call a webservice and display the response.
The response are links to pdf files at external server, that user may choose open.

Tried calling webservice in Preupdate memory netWebForm and get the error "Net simple object init() method was no called before open method".

If write sentence net.init(), no errors at net.post but pageRecieved method doesn´t run.

I don´t known the right way to do that.

NT 6.49

Thank you in advance.
Regards
Manuel

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Call webservice in netwebform
« Reply #1 on: February 08, 2013, 10:50:32 PM »
Hi Manuel,

probably the best way to do it is to make a separate (window) procedure, with a NetWebClient object.
this can be fully automated to send the request to the other server, and get the reply, and then feed that reply back to the calling procedure.

You can use one of the WEbClient examples to develop this procedure, experiment with the right settings for it and so on. Then copy the procedure across to your web app.

The window itself can be set to "hidden" in the web app, so it never appears on the server.

cheers
Bruce

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Call webservice in netwebform
« Reply #2 on: February 19, 2013, 01:43:10 PM »
Hi Bruce

It´s working in the way you said.

Thank you
Regards
Manuel Allo