wsdl2phpgenerator/wsdl2phpgenerator — pull request #111 by kasperg (2014-04-04 14:46:57+00:00)
Title: Refactor Generator

This is my attempt to refactor the Generator into something more understandable.

The result should be that the code is in a better state so we can create a new release containing base type support. We should also have a better chance for adding new features which depend on extracting information from WSDL and XSD files.

I have tried to move all XML handling and querying into classes under the `Xml` namespace and created classes representing the different elements of the schema that we are interested in.

These classes consist of two parts:

1. The metadata for the elements as returned by the PHP SoapClient
2. Their corresponding XML element.

I used DOMDocument for parsing WSDL and XSD files. I would have liked to use SimpleXML but I could not get their XPath implementation to work as expected.

I have tested the refactoring by comparing the output of tests before and after. They are 99% identical. The only difference I see is that 2 places ([like here](https://github.com/wsdl2phpgenerator/wsdl2phpgenerator/blob/master/tests/fixtures/wsdl/mssqlns/MsSequelServerNativeWebServices.wsdl#L536)) elements are now detected properly as nillable. Consequently they are no longer part of the constructor arguments. I consider this a bug fix.

A side note: Testing time on my machine has done from ~35s to ~20s.