Пример #1
0
 /**
  * Set the location at which the WSDL file will be availabe.
  *
  * @see Zend_Soap_Exception
  * @param  Zend_Uri|string $uri
  * @return Zend_Soap_AutoDiscover
  * @throws Zend_Soap_AutoDiscover_Exception
  */
 public function setUri($uri)
 {
     if (!is_string($uri) && !$uri instanceof Zend_Uri) {
         throw new Zend_Soap_AutoDiscover_Exception("No uri given to Zend_Soap_AutoDiscover::setUri as string or Zend_Uri instance.");
     }
     $this->_uri = $uri;
     // change uri in WSDL file also if existant
     if ($this->_wsdl instanceof Zend_Soap_Wsdl) {
         $this->_wsdl->setUri($uri);
     }
     return $this;
 }
Пример #2
0
 /**
  * Set the location at which the WSDL file will be availabe.
  *
  * @see Zend_Soap_Exception
  * @throws Zend_Soap_AutoDiscover_Exception
  * @param  Zend_Uri|string $uri
  * @return Zend_Soap_AutoDiscover
  */
 public function setUri($uri)
 {
     if (is_string($uri)) {
         $uri = Zend_Uri::factory($uri);
     } else {
         if (!$uri instanceof Zend_Uri) {
             require_once "Zend/Soap/AutoDiscover/Exception.php";
             throw new Zend_Soap_AutoDiscover_Exception("No uri given to Zend_Soap_AutoDiscover::setUri as string or Zend_Uri instance.");
         }
     }
     $this->_uri = $uri;
     // change uri in WSDL file also if existant
     if ($this->_wsdl instanceof Zend_Soap_Wsdl) {
         $this->_wsdl->setUri($uri);
     }
     return $this;
 }
Пример #3
0
 /**
  * @group ZF-5736
  */
 public function testHtmlAmpersandInUrlInSetUriIsEncodedCorrectly()
 {
     $wsdl = new Zend_Soap_Wsdl("MyService", "http://example.com");
     $wsdl->setUri(self::URI_WITH_EXPANDED_AMP);
     $this->assertContains(self::URI_WITH_EXPANDED_AMP, $wsdl->toXML());
 }