Recent

Author Topic: WEBService  (Read 11743 times)

mivi71dk

  • Newbie
  • Posts: 6
WEBService
« on: June 14, 2017, 10:57:41 am »
Hi

Do I have any alternatives to Web Service Toolkit if I want to work with a WEBService in Lazarus?

I have found Web service toolkit, and I am struggling with installing it (I Have already asked about this)
https://forum.lazarus.freepascal.org/index.php/topic,24519.0.html

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: WEBService
« Reply #1 on: June 14, 2017, 11:19:21 am »
You do not need that. FPC comes with fcl-web and that contains more than enough to write webservices.
I believe mOrMot is also suitable, as is the Brooks framework. The latter two are third-party, but also opensource. WSDL may be an issue, I believe all these do not have a wsdl importer. WST does, but I did not use it for a long time. I used Delphi for that and changed code by hand.
« Last Edit: June 14, 2017, 11:24:42 am by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: WEBService
« Reply #2 on: June 14, 2017, 03:46:38 pm »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: WEBService
« Reply #3 on: June 15, 2017, 02:17:09 am »
Define your term "work" first. Produce? Consume? Or both? Either way, SOAP? REST? Custom?

ttomas

  • Full Member
  • ***
  • Posts: 245
Re: WEBService
« Reply #4 on: June 15, 2017, 09:29:18 am »
If you mean SOAP Web Services alternative to WST:
1. Indy + IndySOAP
https://sourceforge.net/projects/indysoap/
2. REM Objects (commercial)
3. Manuel build with any TCP/HTTP library fcl-web, Synapse, Indy, etc.

mjustin

  • Full Member
  • ***
  • Posts: 199
    • Habarisoft
Re: WEBService
« Reply #5 on: June 15, 2017, 05:34:08 pm »
For the creation of RESTful web services:

Daraja Framework + daraja-restful extension

Home page:
https://www.habarisoft.com/daraja_framework.html

GitHub:
https://github.com/michaelJustin/daraja-framework
https://github.com/michaelJustin/daraja-restful

(open source/dual licensed)

Regards
Michael Justin

mivi71dk

  • Newbie
  • Posts: 6
Re: WEBService
« Reply #6 on: June 28, 2017, 09:35:18 am »
Define your term "work" first. Produce? Consume? Or both? Either way, SOAP? REST? Custom?

Sorry for my late answer - work caught up with me with other projects.

I need to USE an webservice.
I believe its a SOAP webservice.

This one i.e.: http://webservice.easypos.dk/mivi/getVarer.exe/soap

I have successfully installed Web Service Toolkit 0.7. The newly released version.
I have successfullys imported an WSDL file.

And by reading the WebServiceToolKit.rtf I got it to work
« Last Edit: June 28, 2017, 01:33:52 pm by mivi71dk »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: WEBService
« Reply #7 on: June 28, 2017, 12:39:05 pm »
I have successfully installed Web Service Toolkit 0.7. The newly released version.
A little off topic, but could you please report back your OS, Fpc+Laz versions and OS+Laz bitness? Did you use WST version from trunk or from somewhere else (like Online Package Manager)? With or without any patches? Did you have any compilation problems with that WST?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

mivi71dk

  • Newbie
  • Posts: 6
Re: WEBService
« Reply #8 on: June 28, 2017, 12:44:44 pm »
I have successfully installed Web Service Toolkit 0.7. The newly released version.
A little off topic, but could you please report back your OS, Fpc+Laz versions and OS+Laz bitness? Did you use WST version from trunk or from somewhere else (like Online Package Manager)? With or without any patches? Did you have any compilation problems with that WST?

 - OS: Windows 7 64 bits
 - Lazarus: 1.6.4
 - FPC: 3.0.2
 - OS+Laz bitness Whats is this?
 - Downloaded WST from link from another thread (https://forum.lazarus.freepascal.org/index.php/topic,37285.0.html). Link is in this thread

I copy the content of the downloaded zip files to the folder components under med lazarus folder (C:\Lazaruz).
I believe I then opened, compiled and installed wst_design.lpk.
And I believe that was all. And it went without problems as far as I recall.




avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: WEBService
« Reply #9 on: June 28, 2017, 01:01:49 pm »
Laz bitness Whats is this?
Is your Lazarus 32-bit or 64-bit?

Quote
I then opened, compiled and installed wst_design.lpk.
Have you tried to install wst_synapse.lpk?

Thank you very much for your answers  :D
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

mivi71dk

  • Newbie
  • Posts: 6
Re: WEBService
« Reply #10 on: June 28, 2017, 01:02:32 pm »
Laz bitness Whats is this?
Is your Lazarus 32-bit or 64-bit?

Quote
I then opened, compiled and installed wst_design.lpk.
Have you tried to install wst_synapse.lpk?

Thank you very much for your answers  :D

Yes. And it also gave no problems

How do I tell if it is 32 or 64?

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: WEBService
« Reply #11 on: June 28, 2017, 01:59:44 pm »
Help-->About
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

mivi71dk

  • Newbie
  • Posts: 6
Re: WEBService
« Reply #12 on: June 28, 2017, 02:02:01 pm »

cappe

  • Full Member
  • ***
  • Posts: 191
Re: WEBService problem
« Reply #13 on: June 28, 2017, 04:32:46 pm »
Sorry,
   I have a problem when I call a service created with .net. When I send a string and there are accented characters (òàùèì), the characters arrive at the web service is ?? . I think it's a codepage problem.
The wsdl of the string is
  <S: element minOccurs = "0" maxOccurs = "1" name = "Message" type = "s: string" />

How can I fix it?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: WEBService problem
« Reply #14 on: June 29, 2017, 02:46:11 am »
Sorry,
   I have a problem when I call a service created with .net. When I send a string and there are accented characters (òàùèì), the characters arrive at the web service is ?? . I think it's a codepage problem.
The wsdl of the string is
  <S: element minOccurs = "0" maxOccurs = "1" name = "Message" type = "s: string" />

How can I fix it?

I assume you ran ws_helper on your WSDL file. Check the generated code and see if it's expecting you to pass UnicodeString. I believe that's the default (-gSU switch). If the generated code is expecting String, then you probably parsed the WSDL with the -gSS switch. Try the -gSU switch and then pass in UnicodeString.

 

TinyPortal © 2005-2018