Recent

Author Topic: Write a SOAP service for Linux - How?  (Read 13071 times)

jim99

  • Newbie
  • Posts: 4
Write a SOAP service for Linux - How?
« on: September 02, 2010, 03:50:54 pm »
Hi,

I need to write a SOAP service for Linux (CentOS).

I need to do this using Lazarus/FreePascal.

The service needs to be a binary (daemon) that runs in the background.

Questions:
1. Is this possible (as a standalone executable)?

2. If not, what are the alternatives?

3. How do I start? (links, reference, starting point, method)

4. What additional tools/libraries do I need?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me

jim99

  • Newbie
  • Posts: 4
Re: Write a SOAP service for Linux - How?
« Reply #2 on: September 03, 2010, 11:17:14 am »
Leledumbo,

I have read that page, but the question more specifically is, using this Web Service Toolkit, is it possible to write a 'standalone' application that will run in the background (remember this is a Linux server) and accept SOAP requests, and serve back responses? Is it possible? How difficult is it?

Since it does not come packaged with the Lazarus install, I have to choose a networking library like Indy, Synapse etc. Which one is good for this purpose?


Regards,
Jim

inoussa

  • New Member
  • *
  • Posts: 14
Re: Write a SOAP service for Linux - How?
« Reply #3 on: September 03, 2010, 01:08:11 pm »
Hi

* Yes, it is possible.
* It should not be that difficult. You could start with a simple console or GUI application and once tested and validated move to a linux daemon.
* The two are good and can handle that.

PS : Checkout WST from svn. The 0.5 release is very old and outdated.

iorek

  • New member
  • *
  • Posts: 9
Re: Write a SOAP service for Linux - How?
« Reply #4 on: September 26, 2010, 07:28:23 pm »
PS : Checkout WST from svn. The 0.5 release is very old and outdated.
I am asking the same question as the thread opener - I want to write a SOAP service for linux.
I got wst from svn and installed it (and indy and synaptic). I successfully built http_server and user_client_console. http_server runs fine and waits for connection, but when I want to list users (after selecting soap and http server) I get this error:
Code: [Select]
Choose a item : l
An unhandled exception occurred at $0808C4A8 :
ESOAPException : XML root node must be "Envelope", found : "html:::"
  $0808C4A8  TSOAPBASEFORMATTER__ERROR,  line 2339 of /home/tomaz/razvoj/lazarus-libs/wst/trunk/base_soap_formatter.pas
  $0804C28E  TSOAPFORMATTER__BEGINCALLREAD,  line 115 of /home/tomaz/razvoj/lazarus-libs/wst/trunk/soap_formatter.pas
  $08049C60  TUSERSERVICE_PROXY__GETLIST,  line 75 of /home/tomaz/razvoj/lazarus-libs/wst/trunk/samples/user_service_intf_proxy.pas
  $08048672  HANDLESHOWALL,  line 54 of user_client_console.pas
  $08049838  main,  line 266 of user_client_console.pas

It seems to me, that server does not return SOAP envelop, but plain html document. I would be really grateful if someone could direct me toward a working solution.

LP, Tomaž

mvampire

  • Jr. Member
  • **
  • Posts: 62
Re: Write a SOAP service for Linux - How?
« Reply #5 on: October 01, 2010, 03:34:47 pm »
Can I ask You how to checkout WST from SVN? I mean svn-address (I know how to check out, but I can't find SVN address)... - SOLVED, I found address (https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/wst/trunk) in the wiki.

P.S. Very often I read here that some package or Lazarus itself is "very old and outdated"... But for all other programs except Lazarus I used to use stable versions that usually are really stable and easy to download (without SVN).
Can I ask why not to update latest stable version of WST if new stable is available? And why there are so many recommendations to use development snapshots instead stable versions?
« Last Edit: October 01, 2010, 08:50:11 pm by mvampire »

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Write a SOAP service for Linux - How?
« Reply #6 on: October 01, 2010, 09:20:01 pm »
FPC and Lazarus has a really long time between releases.
There are tons of fixes and new features getting added during the one or two years between releases.

Also, since Lazarus is officially still in beta - and will stay that way for the foreseeable future - there is no guarantee that things will not change that will break older programs (of course FPC is different in this regard because it is already in version 2.4.x, while the SVN version is 2.5.1 atm).

Therefore, there are not many disadvantages to use the SVN version of both. Even if you only update your SVN source codes and recompile them every other month, you will have a more stable and feature rich development system than using a one or two year old stable release.

Just look at the fpweb/FCL-web new features. They are light years ahead in the SVN compared to the latest stable release (ExtJS, JSON/XML support etc.).

This is my 0.02 cents, YMMV.

 

TinyPortal © 2005-2018