Skip to content

Add types in a soap service without property declaration #2

Description

@ctrlaltca

From han...@gmail.com on February 16, 2009 00:15:26

Hi ,
here a snippet to add complex type definition in the wsdl file. It could be
useful where you have some methods returns mixed results.

# Index: WsdlGenerator.php
--- WsdlGenerator.php   ( revision 242 )
+++ WsdlGenerator.php   (working copy)
@@ -97,6 +97,18 @@
        $this->wsdlDocument = new Wsdl($className, $serviceUri, 
$encoding);

    $classReflect = new ReflectionClass($className);
-   
-       $comment = $classReflect->getDocComment();
-       if(strpos($comment, '@soaptype') !== false)
-       {
-           if (preg_match('/@soaptype\s+(\w+([])?)/mi', $comment, $match)) {
-               $param = array();
-               $param['type'] = $this->convertType($match[1]);
-               $param['name'] = $match[1];
-               $this->types[$match[1]][] = $param;
-           }
-       }  
- 
  $methods = $classReflect->getMethods();
  
  foreach ($methods as $method) {

Original issue: http://code.google.com/p/prado3/issues/detail?id=119

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions