Permalink
Browse files

[UPDATE] minor enhancement

[UPDATE] retrieve SoapHeader namespace and add it to the operation php
doc
  • Loading branch information...
mikaelcom committed Jan 22, 2013
1 parent e252260 commit ba2bd51f298bb8ec700deb8a2194b3cec6a7bcde
Showing with 15 additions and 0 deletions.
  1. +15 −0 WsdlToPhpGenerator.php
@@ -2327,6 +2327,21 @@ protected function manageWsdlNodeHeader($_wsdlLocation = '',DOMNode $_domNode,$_
* Indicate that header is required for this operation
*/
$this->addServiceFunctionMeta($parentNode->getAttribute('name'),'SOAPHeader','required');
/**
* Header Namespace ?
*/
if($_domNode->hasAttribute('namespace') && $_domNode->getAttribute('namespace') != '')
$this->addServiceFunctionMeta($parentNode->getAttribute('name'),'SOAPHeaderNamespace',$_domNode->getAttribute('namespace'));
else
{
$definitions = self::findSuitableParent($parentNode,false,array(
'definitions'));
if($definitions && $definitions->hasAttribute('targetNamespace') && $definitions->getAttribute('targetNamespace') != '')
$this->addServiceFunctionMeta($parentNode->getAttribute('name'),'SOAPHeaderNamespace',$definitions->getAttribute('targetNamespace'));
}
/**
* Header types and names
*/
$headerType = '';
$headerName = $_domNode->hasAttribute('part')?$_domNode->getAttribute('part'):'';
$headerMessage = explode(':',$_domNode->hasAttribute('message')?$_domNode->getAttribute('message'):'');

0 comments on commit ba2bd51

Please sign in to comment.