non-complex types only used hints

110 views
Skip to first unread message

te_a...@gmx.net

unread,
Jan 16, 2016, 3:45:26 PM1/16/16
to wsdl2phpgenerator
Hi everyone,

I have a few rather complex WSDLs and need to write SOAPServers and SOAPClients to provide/use these services. wsdl2phpgenerator creates all the complex types and I autoload them into my code.
To create WSDL conform objects I wrote a function which recursivly creates a skeleton by iterating the class-methods and using all setter functions. This is easy for the complex-types in my case as i.e. 'setBook($Book)' will need a 't_Book' object. This approach fails for the basic types like 'int' as I can't detect the class. BUT the correct type can be found in the Documentator strings - which I can't access on runtime (at least to my knowledge).

I noticed that DateTime is different:
public function setBookPageCount(BookPageCount) {}
public function setBookDateTime(\DateTime $BookDateTime) {}

At a first glance I would say this happens in Validator::validateTypeHint() which will only hint arrays and DateTime.

Is there a reason why simple types are ignored? A pitfall I'm missing?

Cheers
Tim

p.s.

version: 3.3.1
options: 'constructorParamsDefaultToNull' => true (but false has the same result)

te_a...@gmx.net

unread,
Jan 16, 2016, 6:23:11 PM1/16/16
to wsdl2phpgenerator, te_a...@gmx.net

Eric Keyte

unread,
Dec 26, 2017, 10:28:03 PM12/26/17
to wsdl2phpgenerator
It wouldn't be unreasonable now since PHP 7, though, eh?
Reply all
Reply to author
Forward
0 new messages