/**
  * @group ZF-4937
  */
 public function testAddingSingularThenArrayTypeIsRecognizedCorretly()
 {
     $return = $this->wsdl->addComplexType('\\ZendTest\\Soap\\TestAsset\\ComplexObjectWithObjectStructure');
     $return = $this->wsdl->addComplexType('\\ZendTest\\Soap\\TestAsset\\ComplexObjectWithObjectStructure[]');
     $wsdl = $this->wsdl->toXML();
     $this->assertEquals(1, substr_count($wsdl, 'wsdl:arrayType="tns:ComplexObjectWithObjectStructure[]"'));
     $this->assertEquals(1, substr_count($wsdl, '<xsd:complexType name="ArrayOfComplexObjectWithObjectStructure">'));
     $this->assertEquals(1, substr_count($wsdl, '<xsd:complexType name="ComplexTest">'));
 }
Exemple #2
0
 /**
  *
  *
  * @param \Zend\Soap\Wsdl $wsdl
  * @param null            $documentNamespace
  */
 public function bindWsdl(Wsdl $wsdl, $documentNamespace = null)
 {
     $this->dom = new \DOMDocument();
     $this->dom->formatOutput = true;
     $this->dom->preserveWhiteSpace = false;
     $this->dom->loadXML($wsdl->toXML());
     if (empty($documentNamespace)) {
         $documentNamespace = $this->defaultServiceUri;
     }
     $this->xpath = new \DOMXPath($this->dom);
     $this->xpath->registerNamespace('unittest', Wsdl::WSDL_NS_URI);
     $this->xpath->registerNamespace('tns', $documentNamespace);
     $this->xpath->registerNamespace('soap', Wsdl::SOAP_11_NS_URI);
     $this->xpath->registerNamespace('soap12', Wsdl::SOAP_12_NS_URI);
     $this->xpath->registerNamespace('xsd', Wsdl::XSD_NS_URI);
     $this->xpath->registerNamespace('soap-enc', Wsdl::SOAP_ENC_URI);
     $this->xpath->registerNamespace('wsdl', Wsdl::WSDL_NS_URI);
 }
Exemple #3
0
 /**
  * @group ZF-5736
  */
 public function testHtmlAmpersandInUrlInSetUriIsEncodedCorrectly()
 {
     $wsdl = new Wsdl("MyService", "http://example.com");
     $wsdl->setUri(self::URI_WITH_EXPANDED_AMP);
     $this->assertContains(self::URI_WITH_EXPANDED_AMP, $wsdl->toXML());
 }