src/XSD2PHP/src/com/mikebevz/xsd2php/wsdl/Wsdl_1_1.php
private function addMessage($name, $type)
    {
        $el = $this->dom->createElement("wsdl:message");
        $el->setAttribute('name', $name);
        $parts = $this->dom->createElement("wsdl:part");
        $parts->setAttribute('name', $name);
        $parts->setAttribute('element', $type);
        $el->appendChild($parts);
        
        //$this->wsMessage->appendChild($el);
        //$this->dom->insertBefore($el, $this->wsPortType);
        //$this->wsDefinitions->replaceChild($el, $this->wsMessage);
        $xpath = new \DOMXPath($this->dom);
        $query = "//*[local-name()='definitions']/*";
        $types = $xpath->query($query);
        //print_r($types->item(0)->getNodePath());
        //$this->dom->insertBefore($el, $types->item(1));
        $this->wsDefinitions->insertBefore($el, $types->item(1));
    }
private function addMessage($name, $type)
    {
        $el = $this->dom->createElement("wsdl:message");
        $el->setAttribute('name', $name);
        $parts = $this->dom->createElement("wsdl:part");
        $parts->setAttribute('name', $name);
        $parts->setAttribute('element', $type);
        $el->appendChild($parts);
        
        //$this->wsMessage->appendChild($el);
        //$this->dom->insertBefore($el, $this->wsPortType);
        //$this->wsDefinitions->replaceChild($el, $this->wsMessage);
        $xpath = new \DOMXPath($this->dom);
        $query = "//*[local-name()='definitions']/*";
        $types = $xpath->query($query);
        //print_r($types->item(0)->getNodePath());
        //$this->dom->insertBefore($el, $types->item(1));
        $this->wsDefinitions->insertBefore($el, $types->item(1));
    }
Add message

<code>
<message name="$name">
<part name="$name" element="$type" />
</message>
</code>

@param string $name Message name
@param string $type Message type

@return void