Fixes and extra features added over the years #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have just created a pull request with all the changes we made to the wsdl-writer over the years. Feel free to merge them in (or not) or cherry-pick. Below are the changes contained in this PR.
Allow creation of webservices with mapped class names, so we do not
expose internal class names.
The typeMapping is an assoc array with as key a php class name and
as value the new type name. The mapping is stored in this wsdl
definition in a new private property.
wsdl definition to sub-modules.
-- add new private property orgClassName, it will be set from a new,
optional, constructor param.
-- made the private static method stripArrayNotation public (static).
No idea why it was private, which is weird for a static method anyway.
-- findComplexTypes: because it tries to reflect the types (which
already have been possibly mapped) we need to revert the mapping
just for the reflection. So the method has a new optional param
with the class mapping.
-- getComplexTypes: it calls the above method and aslo creates
WsdlType objects so it needs to use mapped classnames (in fact
to find the original php classname).
-- getProperties: because the method tries to reflect the type, it
needs the original php classname.
classnames to chosen type names when the (new) setTypeMappings()
method has been called with a mapping. We use some WsdlType static
methods to detect array types because arrays are postfixed with []
array notation, which ofcource cannot be found in the mapping array.
So we need to strip array notation, look up in mapping and ad it
again if needed.
Remove function split() for improved PHP compatibility.
Added parsing of docblocks for class properties, now also detects
@internal tag so properties can be optional in the wsdl.
Added support for optional properties. When the docblock of a class
property contains "@internal optional" then in the wsdl the following
property is added: minOccurs="0"
Change the soapaction URI format to be conform rfc
Added binary, float,date/time primitive types to WsdlType class.
Allow '@internal ignore' docblock var. any method containing this will
not be exposed, even if its public.
The wsdlDefinition can now set the className for situations where
classname and classfile are different.