added soap client specific soap kernel

This commit is contained in:
Andreas Schamberger 2012-04-22 18:08:40 +02:00
parent 8b10219f73
commit 51a971ed33
2 changed files with 49 additions and 4 deletions

View File

@ -13,7 +13,6 @@
namespace BeSimple\SoapClient; namespace BeSimple\SoapClient;
use BeSimple\SoapCommon\Helper; use BeSimple\SoapCommon\Helper;
use BeSimple\SoapCommon\SoapKernel;
use BeSimple\SoapCommon\Converter\MtomTypeConverter; use BeSimple\SoapCommon\Converter\MtomTypeConverter;
use BeSimple\SoapCommon\Converter\SwaTypeConverter; use BeSimple\SoapCommon\Converter\SwaTypeConverter;
@ -79,7 +78,7 @@ class SoapClient extends \SoapClient
/** /**
* Soap kernel. * Soap kernel.
* *
* @var \BeSimple\SoapCommon\SoapKernel * @var \BeSimple\SoapClient\SoapKernel
*/ */
protected $soapKernel = null; protected $soapKernel = null;
@ -252,7 +251,7 @@ class SoapClient extends \SoapClient
/** /**
* Get SoapKernel instance. * Get SoapKernel instance.
* *
* @return \BeSimple\SoapCommon\SoapKernel * @return \BeSimple\SoapClient\SoapKernel
*/ */
public function getSoapKernel() public function getSoapKernel()
{ {
@ -286,7 +285,6 @@ class SoapClient extends \SoapClient
if (!isset($options['typemap'])) { if (!isset($options['typemap'])) {
$options['typemap'] = array(); $options['typemap'] = array();
} }
$soapKernel = $this->soapKernel;
$options['typemap'][] = array( $options['typemap'][] = array(
'type_name' => $converter->getTypeName(), 'type_name' => $converter->getTypeName(),
'type_ns' => $converter->getTypeNamespace(), 'type_ns' => $converter->getTypeNamespace(),

View File

@ -0,0 +1,47 @@
<?php
/*
* This file is part of the BeSimpleSoapCommon.
*
* (c) Christian Kerl <christian-kerl@web.de>
* (c) Francis Besset <francis.besset@gmail.com>
* (c) Andreas Schamberger <mail@andreass.net>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace BeSimple\SoapClient;
use BeSimple\SoapCommon\SoapKernel as CommonSoapKernel;
use BeSimple\SoapCommon\SoapRequest;
use BeSimple\SoapCommon\SoapResponse;
/**
* SoapKernel for Client.
*
* @author Andreas Schamberger <mail@andreass.net>
*/
class SoapKernel extends CommonSoapKernel
{
/**
* {@inheritDoc}
*/
public function filterRequest(SoapRequest $request)
{
$request->setAttachments($this->attachments);
$this->attachments = array();
parent::filterRequest($request);
}
/**
* {@inheritDoc}
*/
public function filterResponse(SoapResponse $response)
{
parent::filterResponse($response);
$this->attachments = $response->getAttachments();
}
}