NetTalk Central

Author Topic: Net Simple - Web Services  (Read 4027 times)

de la Rosa

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Email
Net Simple - Web Services
« on: March 02, 2013, 12:24:50 AM »
Hi,

Given a host of say www.google.com and a webservice at www.google.com/sample/webservice/service.asmx

Since destination IP is www.google.com, how or where to specify in NetSimple to pass the message to /sample/webservice/service.asmx?


Vic


Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Net Simple - Web Services
« Reply #1 on: March 03, 2013, 12:14:46 AM »
Hello Vic,

its done with the  .Send() method, most likely on a button.

Also look at the .Process() method, where all the subsequent communication back and forth takes place. Its a kind of Statement Machine.

http://www.capesoft.com/docs/NetTalk7/nettalk3.htm#NetSimple_Methods

Confusing on the first look, but once you got it, its easy.

Wolfgang

de la Rosa

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Email
Re: Net Simple - Web Services
« Reply #2 on: March 03, 2013, 07:21:39 AM »
Hi Wolfgang,

I think what I need is covered by Clarion Live Webinar 092 by Ben Dell which basically calls to wrap my code is a SOAP script.

Thanks,
Vic

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Net Simple - Web Services
« Reply #3 on: March 03, 2013, 09:34:47 PM »
>> Since destination IP is www.google.com, how or where to specify in NetSimple to pass the message to /sample/webservice/service.asmx?

The webinar is definitely recommended if you are learning how to do SOAP in Clarion.

To answer your specific question above, you'd use the NetWebClient class (which is based on NetSimple) not the NetSimple class directly. And the NetWebClient has two method which both take the whole URL you're describing. For example;

thisnet.Fetch('www.google.com/sample/webservice/service.asmx')
or
thisnet.Post('www.google.com/sample/webservice/service.asmx',moreData)

depending on what the service you are talking to wants.

Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Net Simple - Web Services
« Reply #4 on: March 08, 2013, 04:54:40 AM »
Bruce,
you are right, as usual!

Its .POST() when you want to get a document to a webserver, not .SEND().

I do most communication with NetSimple, so I often confuse between these both.

I saw one remark by you about using NetSimple on Port 80, by adding a HTTP-header. That makes me curious, will try that for push-notification.

Otherwise I'd have to wait for Websockets implemented into Nettalk.....  ;)


de la Rosa

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Email
Re: Net Simple - Web Services
« Reply #5 on: April 03, 2013, 11:39:04 PM »
Bruce,

Now that I am able to be a client to a soap webservice, how can I build a NetTalk WebServer such that the client thinks it's a soap webservice?

Thanks,
Vic


 

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Net Simple - Web Services
« Reply #6 on: April 04, 2013, 06:37:05 PM »
check out the example shipped with NT

de la Rosa

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Email
Re: Net Simple - Web Services
« Reply #7 on: April 05, 2013, 05:36:24 PM »
Hi Kevin,

Thanks for the response. Right, I get the Clarion/NT processing side, I guess what I'm actually after is how to setup the wsdl file such that when the clients are built by non Clarion developers using the wsdl file, that it points to my NT WebServer webservice URL.

Thanks,
Vic



Wolfgang Orth

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • oData Wolfgang Orth
Re: Net Simple - Web Services
« Reply #8 on: April 05, 2013, 11:19:39 PM »
Vic,

you know of http://www.soapui.org/?

There is also a ClarionLive Webinar by Ben Dell about that, where Ben shows how to use it with Nettalk and xFiles.

Wolfgang




de la Rosa

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Email
Re: Net Simple - Web Services
« Reply #9 on: April 07, 2013, 08:31:04 PM »
Hi Wolfgang,

Yeah, 092 is about building a client, now it's the other way around.

Vic