getMessage(), $e->getCode(), null, Http::getStatusText($e->getCode()), 'request'); } catch (Exception $e) { DBG::log($e); throw new Api_OwsException("User is not allowed to read relations from '{$typeName}.{$primaryKey}' to '{$remoteTypeName}'.\n" . $e->getMessage(), 501, null, 'AccessDenied', 'request'); } header('Content-Type: application/json'); echo json_encode([ 'type' => "success", 'msg' => "done", 'body' => [ 'relationSource' => [ 'namespace' => Api_WfsNs::toNamespace($typeName), 'primaryKey' => $primaryKey, 'featureID' => Api_WfsNs::toTypeName($typeName) . ".{$primaryKey}", ], 'relationTarget' => [ 'typeName' => Api_WfsNs::toTypeName($remoteTypeName), ], 'total' => $totalRelations, 'relations' => $listRelations, // 'total' => $total, ] ]); exit; } }