public function addBindingOperation(DOMElement $binding, $name, array $input = null, array $output = null)
    {
        $operation = $this->dom->createElement('operation');
        $operation->setAttribute('name', $name);

        if (is_array($input)) {
            $inputElement = $this->dom->createElement('input');
            $soapElement = $this->dom->createElement('soap:body');
            foreach ($input as $name => $value) {
                $soapElement->setAttribute($name, $value);
            }

            $inputElement->appendChild($soapElement);
            $operation->appendChild($inputElement);
        }

        if (is_array($output)) {
            $outputElement = $this->dom->createElement('output');
            $soapElement = $this->dom->createElement('soap:body');
            foreach ($output as $name => $value) {
                $soapElement->setAttribute($name, $value);
            }

            $outputElement->appendChild($soapElement);
            $operation->appendChild($outputElement);
        }

        $binding->appendChild($operation);

        return $operation;
    }
public function addBindingOperation(DOMElement $binding, $name, array $input = null, array $output = null)
    {
        $operation = $this->dom->createElement('operation');
        $operation->setAttribute('name', $name);

        if (is_array($input)) {
            $inputElement = $this->dom->createElement('input');
            $soapElement = $this->dom->createElement('soap:body');
            foreach ($input as $name => $value) {
                $soapElement->setAttribute($name, $value);
            }

            $inputElement->appendChild($soapElement);
            $operation->appendChild($inputElement);
        }

        if (is_array($output)) {
            $outputElement = $this->dom->createElement('output');
            $soapElement = $this->dom->createElement('soap:body');
            foreach ($output as $name => $value) {
                $soapElement->setAttribute($name, $value);
            }

            $outputElement->appendChild($soapElement);
            $operation->appendChild($outputElement);
        }

        $binding->appendChild($operation);

        return $operation;
    }
public function addBindingOperation ( DOMElement $ binding , $ name , array $ input = null , array $ output = null ) { $ operation = $ this -> dom -> createElement ( 'operation' ) ; $ operation -> setAttribute ( 'name' , $ name ) ; if ( is_array ( $ input ) ) { $ inputElement = $ this -> dom -> createElement ( 'input' ) ; $ soapElement = $ this -> dom -> createElement ( 'soap:body' ) ; foreach ( $ input as $ name => $ value ) { $ soapElement -> setAttribute ( $ name , $ value ) ; } $ inputElement -> appendChild ( $ soapElement ) ; $ operation -> appendChild ( $ inputElement ) ; } if ( is_array ( $ output ) ) { $ outputElement = $ this -> dom -> createElement ( 'output' ) ; $ soapElement = $ this -> dom -> createElement ( 'soap:body' ) ; foreach ( $ output as $ name => $ value ) { $ soapElement -> setAttribute ( $ name , $ value ) ; } $ outputElement -> appendChild ( $ soapElement ) ; $ operation -> appendChild ( $ outputElement ) ; } $ binding -> appendChild ( $ operation ) ; return $ operation ; }
Add an operation to a binding element.

@param DOMElement $binding The binding element (from addBinding() method).
@param string $name The name of the operation.
@param array $input Attributes for the input element (use, namespace, encodingStyle).
@param array $output Attributes for the output element (use, namespace, encodingStyle).
@return DOMElement
@link http://www.w3.org/TR/wsdl#_soap:body
Add an operation to a binding element .