/** * Create the input/output messages WSDL * * @param PhpWsdl $pw The PhpWsdl object * @return string The WSDL */ public function CreateMessages($pw) { PhpWsdl::Debug('Create WSDL message for method ' . $this->Name); $pLen = sizeof($this->Param); $res = array(); // Request if ($pLen < 1) { $res[] = '<wsdl:message name="' . $this->Name . 'SoapIn" />'; } else { $res[] = '<wsdl:message name="' . $this->Name . 'SoapIn">'; $i = -1; while (++$i < $pLen) { $res[] = $this->Param[$i]->CreatePart($pw); } $res[] = '</wsdl:message>'; } // Response if (is_null($this->Return)) { $res[] = '<wsdl:message name="' . $this->Name . 'SoapOut" />'; } else { $res[] = '<wsdl:message name="' . $this->Name . 'SoapOut">'; $res[] = $this->Return->CreatePart($pw); $res[] = '</wsdl:message>'; } return implode('', $res); }
/** * Constructor * * @param string $name The name * @param string $type The type name * @param array $settings Optional the settings hash array (default: NULL) */ public function PhpWsdlElement($name, $type, $settings = null) { PhpWsdl::Debug('New complex type element ' . $name); parent::PhpWsdlParam($name, $type, $settings); $this->NillAble = !in_array($type, PhpWsdl::$NonNillable); if (!is_null($settings)) { if (isset($settings['nillable'])) { $this->NillAble = $settings['nillable'] == '1' || $settings['nillable'] == 'true'; } if (isset($settings['minoccurs'])) { $this->MinOccurs = $settings['minoccurs']; } if (isset($settings['maxoccurs'])) { $this->MaxOccurs = $settings['maxoccurs']; } } }