This is how to define a complex type f.e. - the class ComplexTypeDemo doesn't need to exists, but it would make it easier for you to return that complex type from a method A string with a value A string with a NULL value An integer A boolean A string array type An array of ComplexTypeDemo An int array type The object The object The result of print_r A ComplexTypeDemo array The results of print_r Some name (or an empty string) Response string Response Get a complex type object Print an object Print an array of objects Say hello demo This method has no parameters and no return value, but it is visible in WSDL, too This is how to define a global method for WSDL