/** * TODO - We need to think about where to put this method but I need the * SMD file and access to the references so here will have to * do fo now. I want a cleaner abstraction of JsonRpcClient and * JsonProxy. * * @param SCA_ReferenceType $reference_type Reference type * * @return null */ public function addReferenceType(SCA_ReferenceType $reference_type) { $this->reference_type = $reference_type; // Add type descriptions to the Json DAS. We use XSDs if they // are prvoided. If not we used the SMD and assume the default // namespace provided by the JSON DAS if (count($reference_type->getTypes()) > 0) { // Some XSD types are specified with the reference // annotation so use these XSDs to build the JSON DAS $this->json_das = $this->getJsonDas($reference_type->getTypes(), $reference_type->getClassName()); // get the list of types that have been loaded into // the JSON DAS in this case $this->type_list = SCA_Helper::getAllXmlDasTypes($this->json_das->getXmlDas()); } else { // No XSDs are specified with the reference annotation // so use the SMD to build the JSON DAS $this->json_das = new SDO_DAS_Json(); $this->json_das->addTypesSmdString($this->smd_file); } }
/** * Create XMLRPCDAS * * @param SCA_ReferenceType $reference_type Reference type * * @return object */ protected function createXmlRpcDas($reference_type) { $xsds = $reference_type->getTypes(); $xmlrpc_das = new SCA_Bindings_Xmlrpc_DAS(); foreach ($xsds as $index => $xsds) { list($namespace, $xsdfile) = $xsds; if (SCA_Helper::isARelativePath($xsdfile)) { $xsd = SCA_Helper::constructAbsolutePath($xsdfile, $reference_type->getClassName()); $xmlrpc_das->addTypesXsdFile($xsd); } } return $xmlrpc_das; }