diff --git a/src/Generation/JmsSoapConverter.php b/src/Generation/JmsSoapConverter.php index 7f1d510..9c0389e 100644 --- a/src/Generation/JmsSoapConverter.php +++ b/src/Generation/JmsSoapConverter.php @@ -104,6 +104,9 @@ private function visitMessage(OperationMessage $message, $hint = '', \GoetasWebs $envelopeData["xml_root_namespace"] = $this->soapEnvelopeNs; $envelopeData["xml_namespaces"] = ['SOAP' => $this->soapEnvelopeNs]; + $envelopeData["accessor_order"] = 'custom'; + $envelopeData["custom_accessor_order"] = ['header', 'body']; + $property = []; $property["expose"] = true; $property["access_type"] = "public_method"; @@ -130,8 +133,7 @@ private function visitMessage(OperationMessage $message, $hint = '', \GoetasWebs $property = []; $property["expose"] = true; $property["access_type"] = "public_method"; -// $property["type"] = 'GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler\HeaderPlaceholder<\''.$className.'\'>'; - $property["type"] = $className; + $property["type"] = 'GoetasWebservices\SoapServices\Metadata\Headers\Handler\HeaderPlaceholder<\''.$className.'\'>'; $property["serialized_name"] = 'Header'; $property["xml_element"]["namespace"] = $this->soapEnvelopeNs; diff --git a/src/Generation/PhpSoapConverter.php b/src/Generation/PhpSoapConverter.php index ff525f3..e4d9511 100644 --- a/src/Generation/PhpSoapConverter.php +++ b/src/Generation/PhpSoapConverter.php @@ -75,6 +75,7 @@ private function visitMessage(OperationMessage $message, $hint, \GoetasWebservic $envelopeClass = new PHPClass(); $envelopeClass->setName(Inflector::classify($name)); $envelopeClass->setNamespace($ns . $this->baseNs[$service->getVersion()]['messages']); + $envelopeClass->setImplements(['GoetasWebservices\SoapServices\Metadata\Envelope\Envelope']); $this->classes[$envelopeClass->getFullName()] = $envelopeClass; if ($message->getBody()->getParts()) { @@ -88,12 +89,6 @@ private function visitMessage(OperationMessage $message, $hint, \GoetasWebservic $headerClass->setName(Inflector::classify($name)); $headerClass->setNamespace($ns . $this->baseNs[$service->getVersion()]['headers']); - $topHeader = new PHPClass(); - $topHeader->setName('HeaderPlaceholder'); - $topHeader->setNamespace('GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler'); - - $headerClass->setExtends($topHeader); - $this->classes[$headerClass->getFullName()] = $headerClass; $envelopeClass->addProperty($property); diff --git a/src/Generation/SoapConverter.php b/src/Generation/SoapConverter.php index eae491d..0e31f87 100644 --- a/src/Generation/SoapConverter.php +++ b/src/Generation/SoapConverter.php @@ -143,7 +143,7 @@ private function visitMessage(OperationMessage $message, $hint = '', \GoetasWebs $property = []; $property["expose"] = true; $property["access_type"] = "public_method"; - $property["type"] = count($message->getHeaders()) ? $className : 'GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler\HeaderPlaceholder'; + $property["type"] = count($message->getHeaders()) ? $className : 'GoetasWebservices\SoapServices\Metadata\Headers\Handler\HeaderPlaceholder'; $property["serialized_name"] = 'Header'; $property["xml_element"]["namespace"] = $this->soapEnvelopeNs;