Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function convertPhpToXml($data)
 {
     $part = new MimePart($data);
     $contentId = trim($part->getHeader('Content-ID'), '<>');
     $this->soapKernel->addAttachment($part);
     return sprintf('<%s href="%s"/>', $this->getTypeName(), 'cid:' . $contentId);
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function convertPhpToXml($data)
 {
     $part = new MimePart($data);
     $contentId = trim($part->getHeader('Content-ID'), '<>');
     $this->soapKernel->addAttachment($part);
     $doc = new \DOMDocument();
     $node = $doc->createElement($this->getTypeName());
     $doc->appendChild($node);
     // add xop:Include element
     $xinclude = $doc->createElementNS(Helper::NS_XOP, Helper::PFX_XOP . ':Include');
     $xinclude->setAttribute('href', 'cid:' . $contentId);
     $node->appendChild($xinclude);
     return $doc->saveXML();
 }
Esempio n. 3
0
 /**
  * {@inheritDoc}
  */
 public function filterResponse(CommonSoapResponse $response)
 {
     parent::filterResponse($response);
     $this->attachments = $response->getAttachments();
 }
Esempio n. 4
0
 /**
  * {@inheritDoc}
  */
 public function filterResponse(CommonSoapResponse $response)
 {
     $response->setAttachments($this->attachments);
     $this->attachments = array();
     parent::filterResponse($response);
 }