Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and extra features added over the years #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merijnvdk
Copy link

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.

  • WsdlDefinition: add new method setTypeMapping() and getTypeMapping().
    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.
  • WsdlWriter: now in several places pass the new classmapping from the
    wsdl definition to sub-modules.
  • WsdlType:
    -- 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.
  • WsdlMethod: parameter types and return types will be mapped from php
    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.

Allow creation of webservices with mapped class names, so we do not
expose internal class names.
- WsdlDefinition: add new method setTypeMapping() and getTypeMapping().
  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.
- WsdlWriter: now in several places pass the new classmapping from the
  wsdl definition to sub-modules.
- WsdlType:
  -- 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.
- WsdlMethod: parameter types and return types will be mapped from php
  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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant