예제 #1
0
 public function GetWsdlMessagePart(&$strComplexTypesArray)
 {
     if ($this->blnArray) {
         try {
             $strType = QType::SoapType($this->strType);
             $strArrayTypeName = QSoapService::GetArrayTypeName($strType);
             $strToReturn = sprintf('<part name="%s" type="xsd1:%s"/>', $this->strName, $strArrayTypeName);
             QSoapService::AlterComplexTypesArrayForArrayType($strArrayTypeName, $strType, $strComplexTypesArray);
             return $strToReturn;
         } catch (QInvalidCastException $objExc) {
         }
         $strArrayTypeName = QSoapService::GetArrayTypeName($this->strType);
         QSoapService::AlterComplexTypesArrayForArrayType($strArrayTypeName, 'xsd1:' . $this->strType, $strComplexTypesArray);
         $strToReturn = sprintf('<part name="%s" type="xsd1:%s"/>', $this->strName, $strArrayTypeName);
     } else {
         try {
             return sprintf('<part name="%s" type="xsd:%s"/>', $this->strName, QType::SoapType($this->strType));
         } catch (QInvalidCastException $objExc) {
         }
         $strToReturn = sprintf('<part name="%s" type="xsd1:%s"/>', $this->strName, $this->strType);
     }
     $objReflection = new ReflectionMethod($this->strType, 'AlterSoapComplexTypeArray');
     $objReflection->invoke(null, &$strComplexTypesArray, false);
     return $strToReturn;
 }
예제 #2
0
		////////////////////////////////////////

		public static function GetSoapComplexTypeXml() {
			$strToReturn = '<complexType name="<?php 
echo $objTable->ClassName;
?>
"><sequence>';
<?php 
foreach ($objTable->ColumnArray as $objColumn) {
    if (!$objColumn->Reference || $objColumn->Reference->IsType) {
        ?>
			$strToReturn .= '<element name="<?php 
        echo $objColumn->PropertyName;
        ?>
" type="xsd:<?php 
        echo QType::SoapType($objColumn->VariableType);
        ?>
"/>';
<?php 
    }
    if ($objColumn->Reference && !$objColumn->Reference->IsType) {
        ?>
			$strToReturn .= '<element name="<?php 
        echo $objColumn->Reference->PropertyName;
        ?>
" type="xsd1:<?php 
        echo $objColumn->Reference->VariableType;
        ?>
"/>';
<?php 
    }