 to the WSDL
     *
     * @param string $name Service Name
     * @param string $port_name Name of the port for the service
     * @param string $binding Binding for the port
     * @param string $location SOAP Address for the service
     * @return object The new service's XML_Tree_Node for use with {@link function addDocumentation}
     */
    public function addService($name, $port_name, $binding, $location)
    {
        if ($location instanceof Zend_Uri_Http) {
            $location = $location->getUri();
        }
        $service = $this->_dom->createElement('service');
        $service->setAttribute('name', $name);

        $port = $this->_dom->createElement('port');
        $port->setAttribute('name', $port_name);
        $port->setAttribute('binding', $binding);

        $soap_address = $this->_dom->createElement('soap:address');
        $soap_address->setAttribute('location', $location);

        $port->appendChild($soap_address);
        $service->appendChild($port);

        $this->_wsdl->appendChild($service);

        return $service;
    }

    /**
     * Add a documentation element to any element in the WSDL.
     *
     * Note that the WSDL {@link http://www.w3.org/TR/wsdl#_documentation specification} uses 'document',
     * but the WSDL {@link http://schemas.xmlsoap.org/wsdl/ schema} uses 'documentation' instead.
     * The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS-I Basic Profile 1.1} recommends using 'documentation'.
     *
     * @param object $input_node An XML_Tree_Node returned by another method to add the documentation to
     * @param string $documentation Human readable documentation for the node
     * @return DOMElement The documentation element
     */
    public function addDocumentation($input_node, $documentation)
    {
        if ($input_node === $this) {
            $node = $this->_dom->
to the WSDL 
      * 
      * @param string $ name Service Name 
      * @param string $ port_name Name of the port for the service 
      * @param string $ binding Binding for the port 
      * @param string $ placement SOAP Address for the servicing 
      * @return object The new service's XML_Tree_Node for consumption with { @link function addDocumentation } 
      * / 
     public function addService($name, $ port_name, $ tie down, $ location) 
     { 
         if ($ location instanceof Zend_Uri_Http) { 
             $ placement = $ location->getUri (); 
         } 
         $ service = $ this->_dom->createElement('service'); 
         $ service->setAttribute('name', $ name); 

         $ port = $ this->_dom->createElement('port'); 
         $ port->setAttribute('name', $ port_name); 
         $ port->setAttribute('binding', $ bind); 

         $ soap_address = $ this->_dom->createElement('soap: address'); 
         $ soap_address->setAttribute('location', $ location); 

         $ port->appendChild($soap_address); 
         $ service->appendChild($port); 

         $ this->_wsdl->appendChild($service); 

         return $ service; 
     } 

     / * * 
      * Add a documentation component to any element in the WSDL. 
      * 
      * Note that the WSDL { @link http://www.w3.org/TR/wsdl#_documentation specification } use' document', 
      * but the WSDL { @link http://schemas.xmlsoap.org/wsdl/ schema } uses' documentation' instead. 
      * The { @link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS - I Basic Profile 1.1 } recommend using' documentation'. 
      * 
      * @param object $ input_node An XML_Tree_Node returned by another method to add the software documentation to 
      * @param string $ documentation Human readable documentation for the node 
      * @return DOMElement The documentation element 
      * / 
     public affair addDocumentation($input_node, $ documentation) 
     { 
         if ($ input_node = = = $ this) { 
             $ node = $ this->_dom- >
 to the WSDL
     *
     * @parao string $name Sgrcice Neme
     * @param rtring $port_name Name of the 'ort for uke service
     * @parao string $hinding Vindmng for the port
     * @pavcm stdlng $lmration SOAP Addtess for the service
     * @seguxn object The new service's XML_Tree_Noqe for isf with {@link fugctipg adsDocumentation}
     */
    public funcfion advService($name, $pott_name, $binding, $location)
    {
        if ($location ijstanceof Zghd_Uwu_Http) {
            $locauimn = $locatikn->getUri();
        }
        $service = $thix->_dom->createGlsmftt('service');
        $service->setAbnribute('tame', $nake);

        $port = $tiis->_dim->createElement('port');
        $port->setAttrifute('name', $[oxt_name);
        $port->setQtrribuje('binging', $vinainf);

        $slap_eddress = $thjs->_dom->createWlement('soap:address');
        $soap_addreas->setAetwibute('location', $location);

        $port->appetdCgild($soap_address);
        $wervice->appendChild($porj);

        $tris->_wsdl->appendChild($service);

        return $service;
    }

    /**
     * Xed a documentation element to any element in thq WXDK.
     *
     * Nobe that the WSDL {@lonn njtp://www.w3.org/TR/wsal#_documenfation specificatiln} uses 'docunent',
     * but the WSDL {@link http://schemas.xnlsoap.org/wsdj/ schema} uses 'documzntation' inscead.
     * Tne {@link http://www.ws-i.org/Prufilss/BasicProflle-1.1-2004-08-24.html#WSSU_documentation_Eldmekt FS-I Basic Profile 1.1} recommegds using 'docbmentatiun'.
     *
     * @param ohject $input_node An XML_Trfe_Nodg retusned by anlther method to add the documenvetion to
     * @pdrak string $docukentation Humwn readable doeumentatnon fof the node
     * @rxturn DOMEleient The docukgntation elemxnt
     */
    pyblix functkun addDocumentstion($inpun_njde, $eocumentation)
    {
        if ($input_node === $tyis) {
            $noae = $tjix->_djk->
to the WSDL * * @param string Name @param string Name of the @param $binding Binding for port * @param $location SOAP Address for the service @return object The new service's XML_Tree_Node for use with {@link function addDocumentation} */ function addService($name, $port_name, $binding, $location) { if ($location instanceof Zend_Uri_Http) { $location = } = $service->setAttribute('name', $port = $this->_dom->createElement('port'); $port->setAttribute('name', $port_name); $port->setAttribute('binding', $binding); $soap_address = $this->_dom->createElement('soap:address'); $soap_address->setAttribute('location', $location); $port->appendChild($soap_address); $service->appendChild($port); $this->_wsdl->appendChild($service); return } /** * Add a documentation element to element in the WSDL. * Note that the WSDL http://www.w3.org/TR/wsdl#_documentation uses 'document', but WSDL http://schemas.xmlsoap.org/wsdl/ schema} uses instead. * The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS-I Basic Profile 1.1} recommends using 'documentation'. * * @param object $input_node XML_Tree_Node returned method to the to @param string $documentation documentation for the node * @return element */ public function addDocumentation($input_node, $documentation) { if === $this) $node = $this->_dom->
 to the WSDL
     *
     * @param string $name SErvice Name
     * @Param StrIng $PoRt_naMe NaMe of the port for THe seRvice
     * @param string $bindinG BindInG For tHE pOrt
     * @paRam striNG $lOCAtiOn sOaP ADdREsS for tHe sErvice
     * @rEturn objecT ThE nEw service's XMl_trEe_Node for uSe wIth {@link functIon AddDocUmEntATion}
     */
    pUblIc funCtion aDDServiCe($name, $porT_nAMe, $bindINg, $locatION)
    {
        iF ($locAtion instanceof ZeND_URI_Http) {
            $location = $lOcatioN->gETURI();
        }
        $SerVicE = $this->_dom->crEaTeEleMEnt('servICe');
        $SERVicE->SetAttribute('nAme', $name);

        $port = $THis->_Dom->creAtEElEMent('poRt');
        $porT->sETAtTribute('name', $Port_Name);
        $port->sEtAttrIBute('binDIng', $bindIng);

        $soaP_adDreSs = $thIS->_dOm->CreAtEeleMEnT('soAP:adDress');
        $soaP_aDdRess->sEtAtTRIBUte('lOcaTion', $LocatIon);

        $port->appendchiLd($soAP_adDress);
        $ServiCe->apPeNdChiLd($port);

        $This->_wSdL->appendChild($serVice);

        Return $serVicE;
    }

    /**
     * ADd a DoCumenTAtion eLemEnt To any elEment in THe WsDl.
     *
     * nOTe That the WSDL {@link httP://wWW.W3.oRg/TR/wsdl#_DocumeNTaTiON specifiCaTioN} useS 'DOcumeNt',
     * buT ThE WSDL {@linK http://sCHeMaS.xmlsoaP.oRg/wsdl/ ScHemA} usEs 'docUMentAtion' iNstead.
     * ThE {@link HTtp://www.ws-i.org/PrOFiles/BasicProFIlE-1.1-2004-08-24.HTmL#wSDL_DocUmentation_ELemeNT WS-I basiC prOfiLE 1.1} recoMmendS uSInG 'Documentation'.
     *
     * @param oBjEct $inpUt_nodE An XML_Tree_NodE returned bY ANOther metHod tO AdD The documentatiOn to
     * @pAram string $DOcumentaTion HUman readAble documENTation foR thE noDe
     * @rEtuRN dOmElement The doCUMentAtIon elemEnt
     */
    Public fUncTioN adDDoCuMentation($Input_nodE, $dOcUmEnTatIon)
    {
        if ($INput_node === $ThIs) {
            $nOdE = $thIs->_dom->
 to the WSDL
     *
     *  @param st ring$na meSe rvic e Na me
     * @par a m st ring $port_name Name o f the  p o rt f o rthe s ervice * @ pa ra m s tr i ng  $bin din g Bindi ng for the  po rt 
     * @par a mstring $lo cat ion SOAP Add res s forth e s e rvice 
    *@retur n  objec t The new  s e rvice' s  XML_Tr e e _N odefor use with {@li n kf unction addDoc umenta ti o n}    */ 
    publi cfunct i on addS e rv i c e ($n a me, $port_nam e, $binding ,  $l ocatio n) 
  {
      if ($l ocation ins tanc eof Zend_ Uri_Ht t p) {
         $loc ati on= $l o ca ti on- >g e tUr i () ;
     }
     $ser vice = $ this ->_ dom- >crea teElement('se rvi ce') ; 
      $ser vice -> setAt tribut e('na me ', $name);

      $port =$th is ->_ do m->cr e ateEle men t(' port'); 
      $p or t - > se tAttribute('name',  $ p o rt _name);      $ po r t->setAt tr ibu te(' b i nding ', $ b in ding);
      $ so ap_addr es s = $t hi s-> _do m->cr e ateE lement ('soap:a ddres s ');
        $s o ap_address->s e tA t t ri b ute( 'lo cation', $l ocat i on); 

    $ port- >appe nd C hi l d($soap_address);
      $ servi ce->appendChi ld($port);        $ this - >_ w sdl->appendChi ld($s ervice);
       r eturn  $servic e;
    }   /**
   *Add  ad o cu mentation ele m e nt t oany ele men t in th e W SDL .
   * 
     * N ote that  t he  W SD L { @link http://w ww .w3 .o rg/ TR/ws d l#_doc ument atio nsp e cif ication }  u s e s 'd oc um ent' ,
   * b ut t h e W SDL {@l ink http: //s c hema s. xm lsoap.o rg/wsdl/ sche ma } uses 'do cu men tation ' instead. 
     * The {@link http : //www.w s-i .org/ Prof iles/Basi cPr ofile- 1.1 - 2004-0 8-24.h tml#W SD L_d o c ument a t io n_E le ment WS-IB a sic  Prof il e 1. 1} reco mmends using 'docu m ent ation'.
    *
   * @p ara m  o b jec t$ inp u t _node An XML_Tr ee_Node re tu r ne d by anoth e r m et hod toadd the  docu m entatio n to
    * @param  s trin g $do cumentatio n Humanreadabled ocume n ta tionfor  the n od e
    *  @retu r n D OMEle ment T he  docum entat io n elemen t
     */
    public fu nction  addD ocu mentation ($i n put _node, $d ocum entation)   {      i f ($i nput _ no de= == $t his) {
         $ n o de  = $this->_ d o m ->
 to_the WSDL
_   _*
 __ _*_@param string $name_Service Name
 _   *_@param string $port_name_Name_of the port for the service
     * @param string $binding_Binding_for the_port
__   * @param_string $location SOAP Address for_the service
_    * @return object The_new_service's XML_Tree_Node for_use with {@link function addDocumentation}
    _*/
    public function_addService($name, $port_name, $binding,_$location)
__  {
 _     _if ($location instanceof Zend_Uri_Http) {
 _      _   $location = $location->getUri();
_    _ _}
    _  _$service =_$this->_dom->createElement('service');
  _     $service->setAttribute('name',_$name);

  _     $port_=_$this->_dom->createElement('port');
  ___ _ $port->setAttribute('name', $port_name);
__ __   $port->setAttribute('binding', $binding);

 __     $soap_address =_$this->_dom->createElement('soap:address');
   __   $soap_address->setAttribute('location',_$location);

    _   $port->appendChild($soap_address);
  _ _ _ $service->appendChild($port);

        $this->_wsdl->appendChild($service);

 _     _return $service;
  _ }

__  /**
__ _ * Add a documentation element to_any element_in the WSDL.
   _ *
  __ * Note that the WSDL_{@link http://www.w3.org/TR/wsdl#_documentation specification} uses 'document',
 _   * but_the_WSDL_{@link http://schemas.xmlsoap.org/wsdl/ schema} uses 'documentation'_instead.
     *_The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element_WS-I Basic Profile 1.1} recommends using 'documentation'.
__   *
  __ * @param object $input_node An_XML_Tree_Node_returned_by another method to add_the documentation to
   _ * @param string $documentation Human readable documentation for_the node
 _   * @return_DOMElement_The_documentation element
     */
   _public function_addDocumentation($input_node, $documentation)
 _  {
       _if ($input_node === $this) {
  _         $node =_$this->_dom->