public function addMessage($name, array $parts)
    {
        $message = $this->dom->createElement('message');
        $message->setAttribute('name', $name);

        foreach ($parts as $name => $type) {
            $part = $this->dom->createElement('part');
            $part->setAttribute('name', $name);
            if (is_array($type)) {
                foreach ($type as $key => $value) {
                    $part->setAttribute($key, $value);
                }
            } else {
                $part->setAttribute('type', $type);
            }

            $message->appendChild($part);
        }

        $this->wsdl->appendChild($message);

        return $message;
    }
public function addMessage($name, array $parts)
    {
        $message = $this->dom->createElement('message');
        $message->setAttribute('name', $name);

        foreach ($parts as $name => $type) {
            $part = $this->dom->createElement('part');
            $part->setAttribute('name', $name);
            if (is_array($type)) {
                foreach ($type as $key => $value) {
                    $part->setAttribute($key, $value);
                }
            } else {
                $part->setAttribute('type', $type);
            }

            $message->appendChild($part);
        }

        $this->wsdl->appendChild($message);

        return $message;
    }
public function addMessage ( $ name , array $ parts ) { $ message = $ this -> dom -> createElement ( 'message' ) ; $ message -> setAttribute ( 'name' , $ name ) ; foreach ( $ parts as $ name => $ type ) { $ part = $ this -> dom -> createElement ( 'part' ) ; $ part -> setAttribute ( 'name' , $ name ) ; if ( is_array ( $ type ) ) { foreach ( $ type as $ key => $ value ) { $ part -> setAttribute ( $ key , $ value ) ; } } else { $ part -> setAttribute ( 'type' , $ type ) ; } $ message -> appendChild ( $ part ) ; } $ this -> wsdl -> appendChild ( $ message ) ; return $ message ; }
Add a message element to the WSDL.

@param string $name The name for the message.
@param array $parts Array of parts for the message ('name'=>'type' or 'name'=>array('type'=>'type', 'element'=>'element')).
@return DOMElement
@link http://www.w3.org/TR/wsdl#_messages
Add a message element to the WSDL .