SoapServer/Client now handle binary files correctly & large tests/fixtures update
Soap Server and Client were breaking binary files during transfer due to invalid Mime Message Parser. Now is it working fine with no errors, but the message parser is about to be rewritten into a better form.
This commit is contained in:
@ -13,6 +13,8 @@
|
||||
|
||||
namespace BeSimple\SoapCommon;
|
||||
|
||||
use DOMDocument;
|
||||
|
||||
/**
|
||||
* Base class for SoapRequest and SoapResponse.
|
||||
*
|
||||
@ -73,13 +75,6 @@ abstract class SoapMessage
|
||||
*/
|
||||
protected $content;
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @var \DOMDocument
|
||||
*/
|
||||
protected $contentDomDocument = null;
|
||||
|
||||
/**
|
||||
* Message content type.
|
||||
*
|
||||
@ -170,11 +165,6 @@ abstract class SoapMessage
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
if ($this->contentDomDocument !== null) {
|
||||
$this->content = $this->contentDomDocument->saveXML();
|
||||
$this->contentDomDocument = null;
|
||||
}
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
@ -186,9 +176,6 @@ abstract class SoapMessage
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->content = $content;
|
||||
if (null !== $this->contentDomDocument) {
|
||||
$this->contentDomDocument->loadXML($this->content);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -198,12 +185,10 @@ abstract class SoapMessage
|
||||
*/
|
||||
public function getContentDocument()
|
||||
{
|
||||
if (null === $this->contentDomDocument) {
|
||||
$this->contentDomDocument = new \DOMDocument();
|
||||
$this->contentDomDocument->loadXML($this->content);
|
||||
}
|
||||
$contentDomDocument = new DOMDocument();
|
||||
$contentDomDocument->loadXML($this->content);
|
||||
|
||||
return $this->contentDomDocument;
|
||||
return $contentDomDocument;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user