Cleaned files
This commit is contained in:
@ -28,7 +28,7 @@ class SoapRequest extends Request
|
||||
{
|
||||
return new static($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all(), $request->content);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -67,8 +67,7 @@ class SoapRequest extends Request
|
||||
*/
|
||||
public function getSoapMessage()
|
||||
{
|
||||
if($this->soapMessage === null)
|
||||
{
|
||||
if($this->soapMessage === null) {
|
||||
$this->soapMessage = $this->initializeSoapMessage();
|
||||
}
|
||||
|
||||
@ -87,19 +86,14 @@ class SoapRequest extends Request
|
||||
|
||||
protected function initializeSoapMessage()
|
||||
{
|
||||
if($this->server->has('CONTENT_TYPE'))
|
||||
{
|
||||
if($this->server->has('CONTENT_TYPE')) {
|
||||
$type = $this->splitContentTypeHeader($this->server->get('CONTENT_TYPE'));
|
||||
|
||||
switch($type['_type'])
|
||||
{
|
||||
switch($type['_type']) {
|
||||
case 'multipart/related':
|
||||
if($type['type'] == 'application/xop+xml')
|
||||
{
|
||||
if($type['type'] == 'application/xop+xml') {
|
||||
return $this->initializeMtomSoapMessage($type, $this->getContent());
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
//log error
|
||||
}
|
||||
break;
|
||||
@ -118,8 +112,7 @@ class SoapRequest extends Request
|
||||
|
||||
protected function initializeMtomSoapMessage(array $contentTypeHeader, $content)
|
||||
{
|
||||
if(!isset($contentTypeHeader['start']) || !isset($contentTypeHeader['start-info']) || !isset($contentTypeHeader['boundary']))
|
||||
{
|
||||
if(!isset($contentTypeHeader['start']) || !isset($contentTypeHeader['start-info']) || !isset($contentTypeHeader['boundary'])) {
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
@ -134,13 +127,11 @@ class SoapRequest extends Request
|
||||
|
||||
// TODO: add more checks to achieve full compatibility to MTOM spec
|
||||
// http://www.w3.org/TR/soap12-mtom/
|
||||
if($rootPart->id != $soapMimePartId || $rootPartType['_type'] != 'application/xop+xml' || $rootPartType['type'] != $soapMimePartType)
|
||||
{
|
||||
if($rootPart->id != $soapMimePartId || $rootPartType['_type'] != 'application/xop+xml' || $rootPartType['type'] != $soapMimePartType) {
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
foreach($mimeParts as $mimePart)
|
||||
{
|
||||
foreach($mimeParts as $mimePart) {
|
||||
$this->soapAttachments->add(new SoapAttachment(
|
||||
$mimePart->id,
|
||||
$mimePart->type,
|
||||
@ -160,8 +151,7 @@ class SoapRequest extends Request
|
||||
|
||||
$result['_type'] = array_shift($parts);
|
||||
|
||||
foreach($parts as $part)
|
||||
{
|
||||
foreach($parts as $part) {
|
||||
list($key, $value) = explode('=', trim($part), 2);
|
||||
|
||||
$result[$key] = trim($value, '"');
|
||||
@ -169,4 +159,4 @@ class SoapRequest extends Request
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
@ -57,8 +57,7 @@ class SoapServerFactory
|
||||
{
|
||||
$result = array();
|
||||
|
||||
foreach($this->converters->getTypeConverters() as $typeConverter)
|
||||
{
|
||||
foreach($this->converters->getTypeConverters() as $typeConverter) {
|
||||
$result[] = array(
|
||||
'type_name' => $typeConverter->getTypeName(),
|
||||
'type_ns' => $typeConverter->getTypeNamespace(),
|
||||
@ -78,15 +77,12 @@ class SoapServerFactory
|
||||
{
|
||||
$result = array();
|
||||
|
||||
foreach($this->definition->getHeaders() as $header)
|
||||
{
|
||||
foreach($this->definition->getHeaders() as $header) {
|
||||
$this->addSoapServerClassmapEntry($result, $header->getType());
|
||||
}
|
||||
|
||||
foreach($this->definition->getMethods() as $method)
|
||||
{
|
||||
foreach($method->getArguments() as $arg)
|
||||
{
|
||||
foreach($this->definition->getMethods() as $method) {
|
||||
foreach($method->getArguments() as $arg) {
|
||||
$this->addSoapServerClassmapEntry($result, $arg->getType());
|
||||
}
|
||||
}
|
||||
@ -98,15 +94,14 @@ class SoapServerFactory
|
||||
{
|
||||
// TODO: fix this hack
|
||||
if($type->getXmlType() === null) return;
|
||||
|
||||
|
||||
$xmlType = QName::fromPackedQName($type->getXmlType())->getName();
|
||||
$phpType = $type->getPhpType();
|
||||
|
||||
if(isset($classmap[$xmlType]) && $classmap[$xmlType] != $phpType)
|
||||
{
|
||||
if(isset($classmap[$xmlType]) && $classmap[$xmlType] != $phpType) {
|
||||
// log warning
|
||||
}
|
||||
|
||||
$classmap[$xmlType] = $phpType;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user