The object type XSD \Library\IncrementedInt not a PHP class in the PHP namespace, as you specify:
<?php namespace Library; class IncrementedInt { ...
Actual type prefix:
tns:\Library\IncrementedInt
And remember tns: in front, which is a prefix. You cannot express this in PHP, which becomes even clearer when you extend it to a namespace URI:
{http://localhost/webservice.php}\Library\IncrementedInt
Zend SOAP also occurs from time to PHP Namespaces (PHP 5.2), so for an alias of this type you need to use a different strategy for the type PHP (class name). It takes a local type name:
\Library\IncrementedInt
And replaces each "invalid" character with this underscore type:
_Library_IncrementedInt
Therefore, you need to name the class this way:
<?php class _Library_IncrementedInt { ...
If you want it to work out of the box.
Then you asked using comments to clarify:
So you say that I canβt do anything to have a class with names as a type name, right?
Well, as for the default behavior, most likely not, however, since the term "Strategy" is used, I would say that there is some mechanism for extending the Zend Soap for this operation and injecting another that, for example, allows the use of names classes (classes by their FQCN), see Strategy Template .
And if it's just one class, you can do some cheap trick at the same time and expand your class with names like a short name or an alias using class_alias .