php-src icon indicating copy to clipboard operation
php-src copied to clipboard

wsdl 2.0 support

Open mmarton opened this issue 4 years ago • 14 comments

Description

Hi!

I would like to ask for wsdl 2.0 support. wsdl 2.0 is almost 15year old and there is no builtin or extension support for it.

I found this issue from 2009 asking for the same: https://bugs.php.net/bug.php?id=48013

mmarton avatar Feb 01 '22 14:02 mmarton

I doubt that this will happen, since the SOAP extension is barely maintained, and it might be better to unbundle it in the long run, in favor of a userland implementation.

cmb69 avatar Feb 01 '22 14:02 cmb69

as far as I remember, @nikic some time ago also recommended using the userland implementation, and not the built-in one.

Gemorroj avatar Feb 01 '22 15:02 Gemorroj

Do you know any decent userland soapclient+soapserver implementation with wsdl2 support? I only heard of nusoap, which is more than 10years old, only supports wsdl1 and a monster of a class from the beginning of time is not something I would like to rely on: https://sourceforge.net/projects/nusoap/files/

so we are without alternatives afaik.

mmarton avatar Feb 01 '22 15:02 mmarton

Apparently, ext/soap isn't without issues either.

cmb69 avatar Feb 01 '22 15:02 cmb69

Take a look here: https://packagist.org/explore/?query=soap I think one that offers both client and server is https://packagist.org/packages/laminas/laminas-soap

drealecs avatar Feb 01 '22 15:02 drealecs

Maybe @weierophinney or @Ocramius can clarify whether laminas-soap is suitable to replace ext/soap.

cmb69 avatar Feb 01 '22 15:02 cmb69

I'm not sure, but it links to another lib that looks promising

https://github.com/laminas/laminas-soap This package is considered feature-complete, and is now in security-only maintenance mode If you need an actively developed SOAP client, we recommend phpro/soap-client.

mmarton avatar Feb 01 '22 16:02 mmarton

No, laminas/laminas-soap is based ON ext-soap, and therefore doesn't get us anywhere.

What you want is either of:

  • https://github.com/goetas-webservices/soap-server
  • https://github.com/goetas-webservices/soap-client
  • https://github.com/phpro/soap-client

The above do not depend on ext-soap, which IMO should be deleted and forgotten as soon as possibly feasible :D

Ocramius avatar Feb 01 '22 16:02 Ocramius

/cc @goetas @veewee

Ocramius avatar Feb 01 '22 16:02 Ocramius

@Ocramius, thanks for mentioning!

We recently started a new soap organization that aims for a replacement of ext-soap: https://github.com/php-soap/

It is used as the SOAP implementation behind phpro/soap-client (and hopefully other projects in the future) Theoretically, it can do everything without ext-soap. However, it is far from there yet.

(Especially encoding/decoding and WSDL1+WSDL2 parsing is missing - and will take a lot of time to get right)

I am not actively planning to add any SoapServer support at this moment.

This leaves out goetas' libraries as basically the only ext-soapless replacement I know off, besides sending raw XML over HTTP yourself. Last time I checked, it was not as performant in encoding / decoding compared to the built-in SoapClient. (I could be wrong here though!) It also works by generating types, a client, ... so a lot different from the magical __call-able SoapClient people are used to (and even prefer over eg generated code) Nevertheless, great libraries in there, like the xsd reader - which I am also planning to use.

Unbundling ext-soap seems like a quite drastical decision at this point:

There are MANY, MANY, MANY implementations relying on it to be there. The reason why is because it is pretty much the only tool that solves SOAP, in a (buggy but) quite decent way.

Just search for soap on packagist: most of them use ext-soap. This list don't include any real business applications. At our company alone, I think we have around 50-100 projects relying on it.

Removing or unbundling ext-soap will result in a lot of issues without any plug and play replacement. What would be the alternative for those users?

veewee avatar Feb 01 '22 17:02 veewee

I agree ext-soap is pretty horrible piece of software. I searched for any lightweight library. My requirements: as few depenpendecies as possible, PSR7 and PSR18. I found nothing... I ended up with few my packages.

Unfortunately vaclavvanik/soap-interpreter depends on ext-soap because of serializing/deserializing xml request/response.

Therefore I think ext-soap must survive :-D

vaclavvanik avatar Feb 01 '22 19:02 vaclavvanik

(Dont want to hijack this thread but ... life is too short to reinvent SOAP a 1000 times)

@vaclavvanik : It looks like you are building very similar packages to php-soap and parts of veewee/xml. Care to colabborate? My contact info is on my github profile if you're interested!

veewee avatar Feb 02 '22 06:02 veewee

I would like to ask for wsdl 2.0 support.

Given that this is obviously controversial, anybody interested in this please pursue the RFC process.

cmb69 avatar Apr 07 '22 11:04 cmb69

There seems to be consensus that ext-soap is not great and making major changes is likely not a great idea. If somebody wants they can of course create an RFC but until then I will close this issue.

iluuu1994 avatar Apr 15 '22 12:04 iluuu1994