#1 2013-04-26 11:39:18

Roberto Schneiders
Member
From: Santa Catarina, Brazil
Registered: 2012-09-19
Posts: 127
Website

Does anyone know any alternative to SOAP client for Delphi?

Hello

I've been doing some testing with Java server. We are evaluating the possibility of using SOAP.

I did a test with a data volume of 10Mb. A java application took around 3 seconds to grab the data from the server. A C# application as well. An delphi application ranging from 100 to 150 sec to bring the same result.

I'm doing tests over a gigabit network. Has a certain discrepancy in these tests because the Delphi API apparently does not support GZIPover SOAP. But as the volume of data is small compared to the band, this should not be interfering so much.

I did a profiling in delphi application and noticed that almost all processing is done in msxml6.dll. Strangely even microsoft chose not to use it. The C# application does not use this DLL.

Does anyone know any alternative to SOAP client for Delphi?

As far as I know mORMot only works with Rest, but maybe someone has worked with SOAP ...

Offline

#2 2013-04-26 12:17:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

As I stated in the SAD pdf, SOAP is "Simple" only by name, not by reputation.
smile

SAD pdf wrote:

Since SOAP features a lot of requirements, and expects some plumping according to its format (especially when services are provided from C# or Java), we choose to not re-invent the wheel this time, and rely on existing Delphi libraries (available within the Delphi IDE) for this purpose. If you need a cross-platform SOAP 1.1 compatible solution, or if you version of Delphi does not include SOAP process, you may take a look at http://wiki.freepascal.org/Web_Service_Toolkit which is a web services package for FPC, Lazarus and Delphi.

But for service communication within the mORMot application domain, the RESTful / JSON approach gives much better performance and ease of use. You do not have to play with WSDL or unit wrappers, just share some interface definition between clients and servers. Once you have used the ServiceRegister() methods of mORMot, you will find out how the WCF plumbing is over-sized and over-complicated: imagine that WCF allows only one end-point per interface/contract - in a SOA world, where interface segregation should reign, it is not the easier way to go!

So take a look at http://wiki.freepascal.org/Web_Service_Toolkit

10 Mb is IMHO not a "big volume" at all.

Delphi uses the COM MSXML library, whereas C# has its own XML parser. You are perfectly right. MSXML is known to be slow, e.g. just due to the WideString/OleString marshalling/allocation.

I suspect mORMot will marshall 10 Mb of JSON data in a pretty small time.
From the integrated regression tests, our parser is able to parse 100,000 object lists per second, with 5 KB for each list (113 TSQLRecordPeople objects with all of its 5 fields - 2 integers and 3 strings).
That is, around 500 MB per second, on one single thread of a Core i7 CPU. And I mean JSON parsing, string/unicode un-escaping (if needed), and filling a grid array pointing to the data.
So for 10 MB of JSON (which probably will mean much more data than XML, since it is our not-expanded JSON format with the field names appearing only once) you can guess about 20 ms. smile

IMHO you should better use a RESTful mechanism instead of SOAP, with JSON or XML content.
A lot of official standards are switching to SOAP to a RESTful implementation.
SOAP is convenient, but should be avoided if you do not need interop. Even in the WCF/C# world, you should better use net:tcp and not SOAP in-between WCF services.

Offline

#3 2013-04-26 12:27:10

Roberto Schneiders
Member
From: Santa Catarina, Brazil
Registered: 2012-09-19
Posts: 127
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

Thanks for the help Arnaud.

We are evaluating the two options. We know the benefits of SOA. But the SOAP also has some advantages. How we work with many typed objects between Delphi and Java application server, SOAP facilitates a bit.

It's a long discussion! But we are looking for the best alternative for our case.

http://stackoverflow.com/questions/3285 … st-or-soap

Offline

#4 2013-04-26 12:35:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

I do not understand your point about SOA instead of SOAP.
SOAP is a OSI level 7 transmission protocol, and probably the widely used for implementing SOA!

Offline

#5 2013-04-26 13:02:43

Roberto Schneiders
Member
From: Santa Catarina, Brazil
Registered: 2012-09-19
Posts: 127
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

When I said SOA was referring to REST.

Unfortunately this Web Service Toolkit is very complicated.
I can not even install the components in Lazarus, simply does not compile. What about the components for Delphi (to generate the WSDL)? I have to do everything via command line?

The examples did not compile in XE2. It is extremely frustrating.

Last edited by Roberto Schneiders (2013-04-26 13:04:02)

Offline

#6 2013-04-26 13:09:04

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

The RemObjects library has SOAP support, I think.
See http://wiki.remobjects.com/wiki/WIP:SOAP_Web_Services

Not free, and not as fast as mORMot, but perhaps faster than the Delphi official SOAP/WSDL importer...

Offline

#7 2013-04-26 13:24:14

Roberto Schneiders
Member
From: Santa Catarina, Brazil
Registered: 2012-09-19
Posts: 127
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

I was just looking at it. Unfortunately I installed the Trial in the past to make tests with REST and now, even installing a new version, I can not use because the trial period has ended.

I'll have to find another way to test that.

Thanks for the tips.

Offline

#8 2013-04-26 16:32:04

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: Does anyone know any alternative to SOAP client for Delphi?

Form my POV implementing SOAP client is possible if using existing mORMot classes SynCrtSock.TWinHTTP for communication layer and customJSONSerializer's to serialize/deserialize SOAP messages to delphi classes.
it certainly will require some effort, but..
Or use SynCrtSock.TWinHTTP for communication and this project http://www.philo.de/xml/ to parse XML smile

Offline

#9 2014-10-31 13:20:03

proto
Member
From: Russia, Kostroma
Registered: 2011-09-12
Posts: 31

Re: Does anyone know any alternative to SOAP client for Delphi?

mpv can you put here your implementation?
Пишу интеграцию с единой регистратурой (ФЕР), они используют протокол SOAP и ничего кроме него(. Если поделишься реализацией будет просто чудестно.

Offline

Board footer

Powered by FluxBB